Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release #100

Merged
merged 21 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bba8499
feat(ref: no-ref): update version,remove husky
andriikamaldinov1 Mar 19, 2024
f2c6d58
feat(ref: no-ref): update version,remove husky
andriikamaldinov1 Mar 19, 2024
716bae4
Merge pull request #92 from JsDaddy/feat/update-version
NepipenkoIgor Mar 19, 2024
c262eeb
build(deps-dev): bump webpack-dev-middleware from 5.3.3 to 5.3.4
dependabot[bot] Mar 21, 2024
4d2574d
feat(ref: no-ref): add commit msg to hooks
andriikamaldinov1 Mar 25, 2024
86cb517
Merge pull request #95 from JsDaddy/feat/commit-msg
andriikamaldinov1 Mar 25, 2024
1daaaba
test commit
andriikamaldinov1 Mar 26, 2024
5474ced
fix(ref: no-ref): pre-commit and commit-msg
andriikamaldinov1 Mar 26, 2024
b959eb4
fix(ref: no-ref): remove test from package.json
andriikamaldinov1 Mar 26, 2024
97f380f
Merge pull request #93 from JsDaddy/dependabot/npm_and_yarn/webpack-d…
NepipenkoIgor Mar 26, 2024
6bedeae
build(deps-dev): bump express from 4.18.3 to 4.19.2
dependabot[bot] Mar 26, 2024
5420f4b
Merge pull request #97 from JsDaddy/dependabot/npm_and_yarn/express-4…
NepipenkoIgor Mar 26, 2024
8eceaef
test commitlint
NepipenkoIgor Mar 26, 2024
afff1f2
fix(no-ref): prod build for demo
NepipenkoIgor Mar 26, 2024
cbb1f42
Merge remote-tracking branch 'origin/develop' into fix/test-commitlint
NepipenkoIgor Mar 26, 2024
c175e72
fix(no-ref): prod build for demo v1
NepipenkoIgor Mar 26, 2024
d5e4a9d
Merge pull request #96 from JsDaddy/fix/test-commitlint
NepipenkoIgor Mar 26, 2024
4aa1034
feat(ref: no-ref): add setup hook
andriikamaldinov1 Mar 29, 2024
52bb9ba
feat(ref: no-ref): add setup hook
andriikamaldinov1 Mar 29, 2024
641e03f
Merge pull request #98 from JsDaddy/feat/setup-hook
NepipenkoIgor Mar 29, 2024
62954a9
feat(ref: no-ref): update deps
andriikamaldinov1 Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

commit_msg=$(cat .git/COMMIT_EDITMSG)
echo "$commit_msg" | npx commitlint
19 changes: 19 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -e

npm run lint

output=$(npm run type-coverage)
if echo "$output" | grep -q "lower than "; then
echo "$output"
exit 1 # Terminate the hook script with a non-zero exit code
else
echo "Type coverage is good! 🎉"
fi

npm run test

npm run build

npm run build:lib
39 changes: 39 additions & 0 deletions .github/scripts/setup_hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Define the directory containing sample hooks
SAMPLE_HOOKS_DIR=".github/hooks"

# Define the target directory for Git hooks
GIT_HOOKS_DIR=".git/hooks"

# Function to copy or replace hooks
copy_or_replace_hooks() {
for hook in "$SAMPLE_HOOKS_DIR"/*; do
hook_name=$(basename "$hook")
target_hook="$GIT_HOOKS_DIR/$hook_name"
if [ -f "$target_hook" ]; then
echo "Replacing existing hook: $hook_name"
else
echo "Copying new hook: $hook_name"
fi
cp "$hook" "$target_hook"
chmod ug+x "$target_hook" # Ensure executable permission is set
done
}

# Main function
main() {
# Check if .git/hooks directory exists
if [ ! -d "$GIT_HOOKS_DIR" ]; then
echo "Error: .git/hooks directory not found. Are you in a Git repository?"
exit 1
fi

# Copy or replace hooks
copy_or_replace_hooks

echo "Git hooks setup complete."
}

# Run the main function
main
85 changes: 80 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,92 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
- name: Build demo
node-version: 20

- name: Install deps
run: |
npm ci --force
git submodule update --init --recursive --remote
git submodule update --init --recursive --remote

- name: Semantic Release
id: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release

- name: Build demo app
env:
RELEASE_VERSION: ${{ steps.semantic-release.outputs.new-release-version }}
run: |
echo '********'
echo "RELEASE_VERSION: $RELEASE_VERSION"
echo '********'
bash .github/workflows/scripts/replace_template.sh $RELEASE_VERSION
npm run build

- name: Deploy demo
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/angular-loader/browser

outputs:
version: ${{ steps.semantic-release.outputs.new-release-version }}

slack_notification:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'deployments'
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Project: `${{ github.event.repository.name }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Version: `${{ needs.build.outputs.version || 'TBA' }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
5 changes: 1 addition & 4 deletions .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,4 @@ jobs:
run: |
npm ci --force
git submodule update --init --recursive --remote
npm run lint
npm test
npm run build
npm run build:lib
bash .github/workflows/scripts/quality.sh
19 changes: 19 additions & 0 deletions .github/workflows/scripts/quality.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin

set -e

npm run lint

output=$(npm run type-coverage)
if echo "$output" | grep -q "lower than "; then
echo "$output"
exit 1 # Terminate the hook script with a non-zero exit code
else
echo "Type coverage is good! 🎉"
fi

npm run test

npm run build

npm run build:lib
15 changes: 15 additions & 0 deletions .github/workflows/scripts/replace_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Check if the correct number of arguments are provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi

# Assign arguments to variables
custom_string="$1"

# Perform the replacement and save to output file
sed "s/<%version%>/$custom_string/g" "angular.json" > "angular.json.tmp" && mv "angular.json.tmp" "angular.json"

echo "Template string replaced successfully. 🎉"
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

7 changes: 7 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
branches:
- develop

plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/github'
- 'semantic-release-export-data'
4 changes: 3 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": ["stylelint-config-recommended-scss", "stylelint-prettier/recommended"],
"extends": ["stylelint-config-recommended-scss"],
"customSyntax": "postcss-scss",
"plugins": ["stylelint-prettier"],
"rules": {
"prettier/prettier": true,
"selector-type-no-unknown": [
true,
{
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 17.3.2(2024-03-29)

### Feature

- change decorators to signals

<a name="17.0.0"></a>

# 17.0.0(2023-11-28)

### Feature
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ You can also try our NGX COPYPASTE [check](https://www.npmjs.com/package/ngx-cop
$ npm install --save ngx-loader-indicator
```


## Quickstart if ngx-loader-indicator version >= 15.0.0

Pay attention this version works for angular >= 14.0.0
Expand Down
Loading
Loading