-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5c9380d
Showing
21 changed files
with
11,100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# This workflow will build and test an Angular project | ||
name: Vang (ViteJS & Angular) | ||
|
||
on: | ||
push: | ||
branches: ['master'] | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: ['master'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: ['>=16.0.0'] # Specify the Node.js version range | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm test | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
# Only run this job when a valid tag is pushed | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- name: Check if tag exists | ||
id: check_tag | ||
run: | | ||
if [ -n "$GITHUB_REF" ]; then | ||
TAG=${GITHUB_REF#refs/tags/} | ||
echo "TAG=${TAG}" >> $GITHUB_ENV | ||
else | ||
echo "TAG=" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Apply changelog | ||
run: chmod +x git_changelog.sh | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
run: | | ||
CHANGELOG=$(./git_changelog.sh) | ||
echo "CHANGELOG=$CHANGELOG" >> $GITHUB_ENV | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.TAG }} | ||
body: | | ||
:gem: released new version ${{ env.TAG }} | ||
Changelog: | ||
${{ env.CHANGELOG }} | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Notify | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
tags: | ||
- "v*" | ||
pull_request: | ||
branches: ["master"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
notify: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Check Secrets | ||
id: check | ||
run: | | ||
if [[ -z "${{ secrets.TELEGRAM_CHAT_ID }}" || -z "${{ secrets.TELEGRAM_BOT_TOKEN }}" ]]; then | ||
echo "::set-output name=skip::true" | ||
else | ||
echo "::set-output name=skip::false" | ||
fi | ||
- name: Send Telegram Notification | ||
if: steps.check.outputs.skip == 'false' | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_CHAT_ID }} | ||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }} | ||
format: markdown | ||
message: | | ||
🚀 CI Commit | ||
🔯 `${{ github.actor }}` created commit: | ||
- message: `${{ github.event.commits[0].message }}` | ||
- hash: `${{ github.sha }}` | ||
- repository: `${{ github.repository }}` | ||
- head: `${{ github.event.head_commit.message }}` | ||
🍀 See changes: `https://github.com/${{ github.repository }}/commit/${{github.sha}}` | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
needs: build | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check if tag exists | ||
id: check_tag | ||
run: | | ||
if [ -n "$GITHUB_REF" ]; then | ||
TAG=${GITHUB_REF#refs/tags/} | ||
# echo "::set-output name=tag::$TAG" | ||
echo "TAG=${TAG}" >> $GITHUB_ENV | ||
else | ||
# echo "::set-output name=tag::" | ||
echo "TAG=" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
|
||
- name: Check Secrets | ||
id: check | ||
run: | | ||
if [[ -z "${{ secrets.TELEGRAM_CHAT_ID }}" || -z "${{ secrets.TELEGRAM_BOT_TOKEN }}" ]]; then | ||
echo "::set-output name=skip::true" | ||
else | ||
echo "::set-output name=skip::false" | ||
fi | ||
- name: Generate Changelog | ||
id: changelog | ||
run: | | ||
# Generate your changelog here and set it as an output variable | ||
CHANGELOG=$(git log --pretty=format:"%h - %s" -n 10) | ||
echo "::set-output name=changelog::$CHANGELOG" | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.TAG }} | ||
body: | | ||
:gem: released new version ${{ env.TAG }} | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Send Telegram Notification | ||
if: steps.check.outputs.skip == 'false' | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_CHAT_ID }} | ||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }} | ||
format: markdown | ||
message: | | ||
🚀 New tag created: **${{ env.TAG }}** | ||
🔯 `${{ github.actor }}` created tag: | ||
- repository: `${{ github.repository }}` | ||
- head: `${{ github.event.head_commit.message }}` | ||
🍀 See changes: `https://github.com/${{ github.repository }}/releases/tag/${{ env.TAG }}` | ||
📜 Changelog: | ||
`${{ steps.changelog.outputs.changelog }}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/ngx-fes-shops | ||
# Only exists if Bazel was run | ||
/bazel-out | ||
/logs | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# profiling files | ||
chrome-profiler-events*.json | ||
speed-measure-plugin*.json | ||
project_structure.txt | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Cache | ||
.angular/* | ||
|
||
# Package Json | ||
# package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"cSpell.words": ["nitedani", "softprops", "Vite"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
You can use the tree command-line utility in Node.js to generate a tree-like structure of your project directory. Here's how you can use it: | ||
|
||
First, make sure you have the `tree-node-cli` package installed globally: | ||
|
||
```bash | ||
npm install -g tree-node-cli | ||
``` | ||
|
||
Then, navigate to your project directory and run the following command: | ||
|
||
```bash | ||
tree -I "node_modules|.git|.DS_Store" | ||
``` | ||
|
||
If you want to save the output to a file instead of printing it to the console, you can use the -o option followed by the file path: | ||
|
||
```bash | ||
tree -I "node_modules|.git|.DS_Store" > project_structure.txt | ||
``` | ||
|
||
This will save the output to a file named `project_structure.txt`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.PHONY: dev start build clean publish | ||
|
||
dev: | ||
npm run dev | ||
|
||
start: | ||
npm run start | ||
|
||
build: | ||
npm run build | ||
|
||
clean: | ||
rm -rf dist | ||
|
||
publish: | ||
npm run publish | ||
|
||
tree: | ||
# Create logs directory if not exists | ||
mkdir -p logs | ||
# Generate project structure and save it to logs/project_structure.txt | ||
tree -I "node_modules|.git|.DS_Store" > ./logs/project_structure.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Vang | ||
|
||
A base template for creating Angular projects integrated with ViteJS for efficient development and production builds. | ||
|
||
## Features | ||
|
||
- **Angular Integration**: Provides a basic Angular project structure with essential dependencies. | ||
- **ViteJS Integration**: Utilizes ViteJS for fast and optimized development server and production builds. | ||
- **Makefile**: Includes a Makefile with convenient commands for development, building, cleaning, and publishing the project. | ||
- **Enhanced Development Experience**: Leverages ViteJS's features like hot module replacement (HMR) and fast cold server start for an enhanced development experience. | ||
|
||
## Getting Started | ||
|
||
1. Clone this repository: | ||
```bash | ||
git clone https://github.com/sivaosorg/vang.git | ||
``` | ||
2. Navigate into the project directory: | ||
```bash | ||
cd vang | ||
``` | ||
3. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
|
||
## Usage | ||
|
||
### Development | ||
|
||
Run the development server: | ||
|
||
```bash | ||
make dev | ||
``` | ||
|
||
This command starts the development server with hot module replacement (HMR) enabled. | ||
|
||
### Production Build | ||
|
||
Build the project for production: | ||
|
||
```bash | ||
make build | ||
``` | ||
|
||
This command generates a production-ready build of the project in the `dist` directory. | ||
|
||
### Cleaning | ||
|
||
Remove the dist directory: | ||
|
||
```bash | ||
make clean | ||
``` | ||
|
||
### Publishing | ||
|
||
Generate a production build and optimize for production: | ||
|
||
```bash | ||
make publish | ||
``` | ||
|
||
## Structures | ||
|
||
```sh | ||
vang | ||
├── Makefile | ||
├── README.md | ||
├── index.html | ||
├── package-lock.json | ||
├── package.json | ||
├── src | ||
│ ├── app | ||
│ │ ├── app.component.html | ||
│ │ ├── app.component.scss | ||
│ │ ├── app.component.ts | ||
│ │ └── app.service.ts | ||
│ ├── assets | ||
│ ├── environments | ||
│ │ └── environment.ts | ||
│ └── main.ts | ||
├── tsconfig.json | ||
└── vite.config.ts | ||
``` | ||
|
||
## Dependencies | ||
|
||
- `Angular`: Angular framework for building single-page web applications. | ||
- `ViteJS`: Fast build tool for modern web development. | ||
- `@nitedani/vite-plugin-angular`: Vite plugin for Angular support. | ||
- `sass`: CSS preprocessor for styling. | ||
- `typescript`: Programming language for large-scale JavaScript application development. | ||
- `vite-tsconfig-paths`: Vite plugin for TypeScript paths resolution. |
Oops, something went wrong.