Skip to content

Commit

Permalink
Merge pull request #111 from JsDaddy/fix/test-commitlint
Browse files Browse the repository at this point in the history
Fix/test commitlint
  • Loading branch information
NepipenkoIgor authored Mar 26, 2024
2 parents 3f8ed35 + 4ce5399 commit fb2058f
Show file tree
Hide file tree
Showing 26 changed files with 11,513 additions and 25,136 deletions.
2 changes: 1 addition & 1 deletion .github/.hooks/commit-msg/check-commit-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e

commit_msg=$(cat .git/COMMIT_EDITMSG)
echo "$commit_msg" | npx commitlint
echo "$commit_msg" | npx commitlint
2 changes: 2 additions & 0 deletions .github/.hooks/pre-commit/quality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fi

npm run test

npm run cypress:bash

npm run build

npm run build:lib
6 changes: 1 addition & 5 deletions .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@ jobs:
run: |
npm ci --force
git submodule update --init --recursive --remote
npm run lint
npm test
npm run cypress:bash
npm run build
npm run build:lib
bash .github/workflows/scripts/quality.sh
2 changes: 2 additions & 0 deletions .github/workflows/scripts/quality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fi

npm run test

npm run cypress:bash

npm run build

npm run build:lib
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
88 changes: 37 additions & 51 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,37 @@
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"standalone": true,
"changeDetection": "OnPush",
"viewEncapsulation": "Emulated"
},
"@schematics/angular:directive": {
"standalone": true
},
"@schematics/angular:pipe": {
"standalone": true
},
"@schematics/angular:application": {
"strict": true
}
},
"projects": {
"ngx-copypaste": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"standalone": true,
"changeDetection": "OnPush",
"viewEncapsulation": "ShadowDom"
},
"@schematics/angular:application": {
"strict": true
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/ngx-copypaste",
"browser": "src/main.ts",
"index": "src/index.html",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"node_modules/highlight.js/styles/github.css",
Expand All @@ -43,33 +49,21 @@
"define": {
"VERSION": "'<%version%>'"
},
"optimization": true,
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "2mb",
"maximumError": "2mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "9kb",
"maximumError": "10kb"
"maximumWarning": "15kb",
"maximumError": "15kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
"outputHashing": "all"
},
"development": {
"define": {
"VERSION": "'v0.0.1'"
},
"optimization": false,
"extractLicenses": false,
"sourceMap": true
Expand All @@ -88,22 +82,23 @@
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "ngx-copypaste:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-devkit/build-angular:web-test-runner",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets",
"src/robots.txt",
"src/sitemap.xml"
],
"polyfills": [
"zone.js",
"zone.js/testing"
],
"styles": ["src/styles.scss"],
"scripts": [],
"assets": ["src/favicon.ico", "src/assets"]
"scripts": []
}
},
"lint": {
Expand Down Expand Up @@ -134,15 +129,6 @@
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ngx-copypaste-lib/src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "projects/ngx-copypaste-lib/tsconfig.spec.json",
"karmaConfig": "projects/ngx-copypaste-lib/karma.conf.js"
}
}
}
}
Expand Down
Loading

0 comments on commit fb2058f

Please sign in to comment.