Skip to content

Commit bbdb670

Browse files
committed
chore: add git hooks, add project library and demo application
1 parent ec1adcf commit bbdb670

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+15332
-2227
lines changed

.eslintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"plugins": [],
5+
"overrides": [
6+
{
7+
"files": ["*.ts"],
8+
"parserOptions": {
9+
"project": ["tsconfig.json"],
10+
"createDefaultProgram": true
11+
},
12+
"extends": [
13+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
14+
"plugin:@angular-eslint/all"
15+
],
16+
"rules": {
17+
"@angular-eslint/sort-ngmodule-metadata-arrays": "off"
18+
}
19+
},
20+
{
21+
"files": ["*.html"],
22+
"extends": ["plugin:@angular-eslint/template/all"],
23+
"rules": {
24+
"@angular-eslint/template/i18n": "off"
25+
}
26+
}
27+
]
28+
}

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"arrowParens": "avoid",
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"printWidth": 100
7+
}

angular.json

+154-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,160 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": "7fe20bee-c0f5-464f-bd35-06bd8f6c9094",
5+
"defaultCollection": "@angular-eslint/schematics"
6+
},
37
"version": 1,
48
"newProjectRoot": "projects",
59
"projects": {
6-
}
10+
"ngx-reactive-loading": {
11+
"projectType": "library",
12+
"root": "projects/ngx-reactive-loading",
13+
"sourceRoot": "projects/ngx-reactive-loading/src",
14+
"prefix": "lib",
15+
"architect": {
16+
"build": {
17+
"builder": "@angular-devkit/build-angular:ng-packagr",
18+
"options": {
19+
"project": "projects/ngx-reactive-loading/ng-package.json"
20+
},
21+
"configurations": {
22+
"production": {
23+
"tsConfig": "projects/ngx-reactive-loading/tsconfig.lib.prod.json"
24+
},
25+
"development": {
26+
"tsConfig": "projects/ngx-reactive-loading/tsconfig.lib.json"
27+
}
28+
},
29+
"defaultConfiguration": "production"
30+
},
31+
"test": {
32+
"builder": "@angular-devkit/build-angular:karma",
33+
"options": {
34+
"main": "projects/ngx-reactive-loading/src/test.ts",
35+
"tsConfig": "projects/ngx-reactive-loading/tsconfig.spec.json",
36+
"karmaConfig": "projects/ngx-reactive-loading/karma.conf.js"
37+
}
38+
},
39+
"lint": {
40+
"builder": "@angular-eslint/builder:lint",
41+
"options": {
42+
"lintFilePatterns": [
43+
"projects/ngx-reactive-loading/**/*.ts",
44+
"projects/ngx-reactive-loading/**/*.html"
45+
]
46+
}
47+
}
48+
}
49+
},
50+
"ngx-reactive-loading-demo": {
51+
"projectType": "application",
52+
"schematics": {
53+
"@schematics/angular:component": {
54+
"style": "scss"
55+
},
56+
"@schematics/angular:application": {
57+
"strict": true
58+
}
59+
},
60+
"root": "projects/ngx-reactive-loading-demo",
61+
"sourceRoot": "projects/ngx-reactive-loading-demo/src",
62+
"prefix": "app",
63+
"architect": {
64+
"build": {
65+
"builder": "@angular-devkit/build-angular:browser",
66+
"options": {
67+
"outputPath": "dist/ngx-reactive-loading-demo",
68+
"index": "projects/ngx-reactive-loading-demo/src/index.html",
69+
"main": "projects/ngx-reactive-loading-demo/src/main.ts",
70+
"polyfills": "projects/ngx-reactive-loading-demo/src/polyfills.ts",
71+
"tsConfig": "projects/ngx-reactive-loading-demo/tsconfig.app.json",
72+
"inlineStyleLanguage": "scss",
73+
"assets": [
74+
"projects/ngx-reactive-loading-demo/src/favicon.ico",
75+
"projects/ngx-reactive-loading-demo/src/assets"
76+
],
77+
"styles": ["projects/ngx-reactive-loading-demo/src/styles.scss"],
78+
"scripts": []
79+
},
80+
"configurations": {
81+
"production": {
82+
"budgets": [
83+
{
84+
"type": "initial",
85+
"maximumWarning": "500kb",
86+
"maximumError": "1mb"
87+
},
88+
{
89+
"type": "anyComponentStyle",
90+
"maximumWarning": "2kb",
91+
"maximumError": "4kb"
92+
}
93+
],
94+
"fileReplacements": [
95+
{
96+
"replace": "projects/ngx-reactive-loading-demo/src/environments/environment.ts",
97+
"with": "projects/ngx-reactive-loading-demo/src/environments/environment.prod.ts"
98+
}
99+
],
100+
"outputHashing": "all"
101+
},
102+
"development": {
103+
"buildOptimizer": false,
104+
"optimization": false,
105+
"vendorChunk": true,
106+
"extractLicenses": false,
107+
"sourceMap": true,
108+
"namedChunks": true
109+
}
110+
},
111+
"defaultConfiguration": "production"
112+
},
113+
"serve": {
114+
"builder": "@angular-devkit/build-angular:dev-server",
115+
"configurations": {
116+
"production": {
117+
"browserTarget": "ngx-reactive-loading-demo:build:production"
118+
},
119+
"development": {
120+
"browserTarget": "ngx-reactive-loading-demo:build:development"
121+
}
122+
},
123+
"defaultConfiguration": "development"
124+
},
125+
"extract-i18n": {
126+
"builder": "@angular-devkit/build-angular:extract-i18n",
127+
"options": {
128+
"browserTarget": "ngx-reactive-loading-demo:build"
129+
}
130+
},
131+
"test": {
132+
"builder": "@angular-devkit/build-angular:karma",
133+
"options": {
134+
"main": "projects/ngx-reactive-loading-demo/src/test.ts",
135+
"polyfills": "projects/ngx-reactive-loading-demo/src/polyfills.ts",
136+
"tsConfig": "projects/ngx-reactive-loading-demo/tsconfig.spec.json",
137+
"karmaConfig": "projects/ngx-reactive-loading-demo/karma.conf.js",
138+
"inlineStyleLanguage": "scss",
139+
"assets": [
140+
"projects/ngx-reactive-loading-demo/src/favicon.ico",
141+
"projects/ngx-reactive-loading-demo/src/assets"
142+
],
143+
"styles": ["projects/ngx-reactive-loading-demo/src/styles.scss"],
144+
"scripts": []
145+
}
146+
},
147+
"lint": {
148+
"builder": "@angular-eslint/builder:lint",
149+
"options": {
150+
"lintFilePatterns": [
151+
"projects/ngx-reactive-loading-demo/**/*.ts",
152+
"projects/ngx-reactive-loading-demo/**/*.html"
153+
]
154+
}
155+
}
156+
}
157+
}
158+
},
159+
"defaultProject": "ngx-reactive-loading"
7160
}

commitlint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

0 commit comments

Comments
 (0)