Skip to content

Commit 580393b

Browse files
Chau TranChau Tran
Chau Tran
authored and
Chau Tran
committed
feat: generate new lib
1 parent 8aa899b commit 580393b

16 files changed

+211
-53
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22

33
/dist
44
/coverage
5+
6+
.angular

libs/angular-three/.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"rules": {
8+
"@angular-eslint/directive-selector": "off",
9+
"@angular-eslint/directive-class-suffix": "off",
10+
"@angular-eslint/component-selector": "off",
11+
"@angular-eslint/component-class-suffix": "off",
12+
"@typescript-eslint/no-empty-function": "off",
13+
"@typescript-eslint/ban-ts-comment": "off",
14+
"@typescript-eslint/no-explicit-any": "off",
15+
"@typescript-eslint/ban-types": "off",
16+
"@typescript-eslint/member-ordering": "off",
17+
"@typescript-eslint/no-non-null-assertion": "off"
18+
},
19+
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
20+
},
21+
{
22+
"files": ["*.html"],
23+
"extends": ["plugin:@nx/angular-template"],
24+
"rules": {}
25+
}
26+
]
27+
}

libs/angular-three/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# angular-three
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Running unit tests
6+
7+
Run `nx test angular-three` to execute the unit tests.

libs/angular-three/jest.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'angular-three',
4+
preset: '../../jest.preset.js',
5+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6+
coverageDirectory: '../../coverage/libs/angular-three',
7+
transform: {
8+
'^.+\\.(ts|mjs|js|html)$': [
9+
'jest-preset-angular',
10+
{
11+
tsconfig: '<rootDir>/tsconfig.spec.json',
12+
stringifyContentPathRegex: '\\.(html|svg)$',
13+
},
14+
],
15+
},
16+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
17+
snapshotSerializers: [
18+
'jest-preset-angular/build/serializers/no-ng-attributes',
19+
'jest-preset-angular/build/serializers/ng-snapshot',
20+
'jest-preset-angular/build/serializers/html-comment',
21+
],
22+
};

libs/angular-three/ng-package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../dist/libs/angular-three",
4+
"lib": {
5+
"entryFile": "src/index.ts"
6+
}
7+
}

libs/angular-three/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "angular-three",
3+
"version": "0.0.1",
4+
"peerDependencies": {
5+
"@angular/common": "^16.0.0",
6+
"@angular/core": "^16.0.0"
7+
},
8+
"dependencies": {
9+
"tslib": "^2.3.0"
10+
},
11+
"sideEffects": false
12+
}

libs/angular-three/project.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "angular-three",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "libs/angular-three/src",
5+
"prefix": "ngt",
6+
"tags": [],
7+
"projectType": "library",
8+
"targets": {
9+
"build": {
10+
"executor": "@nx/angular:package",
11+
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
12+
"options": {
13+
"project": "libs/angular-three/ng-package.json"
14+
},
15+
"configurations": {
16+
"production": {
17+
"tsConfig": "libs/angular-three/tsconfig.lib.prod.json"
18+
},
19+
"development": {
20+
"tsConfig": "libs/angular-three/tsconfig.lib.json"
21+
}
22+
},
23+
"defaultConfiguration": "production"
24+
},
25+
"test": {
26+
"executor": "@nx/jest:jest",
27+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
28+
"options": {
29+
"jestConfig": "libs/angular-three/jest.config.ts",
30+
"passWithNoTests": true
31+
},
32+
"configurations": {
33+
"ci": {
34+
"ci": true,
35+
"codeCoverage": true
36+
}
37+
}
38+
},
39+
"lint": {
40+
"executor": "@nx/linter:eslint",
41+
"outputs": ["{options.outputFile}"],
42+
"options": {
43+
"lintFilePatterns": ["libs/angular-three/**/*.ts", "libs/angular-three/**/*.html"]
44+
}
45+
}
46+
}
47+
}

libs/angular-three/src/index.ts

Whitespace-only changes.

libs/angular-three/src/test-setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import 'jest-preset-angular/setup-jest';

libs/angular-three/tsconfig.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2022",
4+
"useDefineForClassFields": false,
5+
"forceConsistentCasingInFileNames": true,
6+
"strict": true,
7+
"noImplicitOverride": true,
8+
"noPropertyAccessFromIndexSignature": true,
9+
"noImplicitReturns": true,
10+
"noFallthroughCasesInSwitch": true
11+
},
12+
"files": [],
13+
"include": [],
14+
"references": [
15+
{
16+
"path": "./tsconfig.lib.json"
17+
},
18+
{
19+
"path": "./tsconfig.spec.json"
20+
}
21+
],
22+
"extends": "../../tsconfig.base.json",
23+
"angularCompilerOptions": {
24+
"enableI18nLegacyMessageIdFormat": false,
25+
"strictInjectionParameters": true,
26+
"strictInputAccessModifiers": true,
27+
"strictTemplates": true
28+
}
29+
}

libs/angular-three/tsconfig.lib.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"declaration": true,
6+
"declarationMap": true,
7+
"inlineSources": true,
8+
"types": []
9+
},
10+
"exclude": ["src/**/*.spec.ts", "src/test-setup.ts", "jest.config.ts", "src/**/*.test.ts"],
11+
"include": ["src/**/*.ts"]
12+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.lib.json",
3+
"compilerOptions": {
4+
"declarationMap": false
5+
},
6+
"angularCompilerOptions": {
7+
"compilationMode": "partial"
8+
}
9+
}

libs/angular-three/tsconfig.spec.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"module": "commonjs",
6+
"target": "es2016",
7+
"types": ["jest", "node"]
8+
},
9+
"files": ["src/test-setup.ts"],
10+
"include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
11+
}

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
"@angular/cli": "~16.0.0",
1818
"@angular/compiler-cli": "16.0.0",
1919
"@angular/language-service": "16.0.0",
20+
"@nx/angular": "16.1.1",
21+
"@nx/devkit": "16.1.1",
22+
"@nx/eslint-plugin": "16.1.1",
23+
"@nx/jest": "16.1.1",
24+
"@nx/js": "16.1.1",
25+
"@nx/linter": "16.1.1",
26+
"@nx/plugin": "16.1.1",
27+
"@nx/workspace": "16.1.1",
2028
"@release-it/bumper": "^4.0.2",
2129
"@release-it/conventional-changelog": "^5.1.1",
2230
"@schematics/angular": "16.0.0",
@@ -35,8 +43,9 @@
3543
"jest-environment-jsdom": "29.5.0",
3644
"jest-preset-angular": "13.0.1",
3745
"jsonc-eslint-parser": "^2.2.0",
38-
"ng-packagr": "16.0.0",
46+
"ng-packagr": "~16.0.0",
3947
"nx": "16.1.1",
48+
"nx-cloud": "16.0.5",
4049
"postcss": "^8.4.21",
4150
"postcss-import": "~15.1.0",
4251
"postcss-preset-env": "~8.3.1",
@@ -46,16 +55,7 @@
4655
"release-it": "^15.10.1",
4756
"ts-jest": "29.1.0",
4857
"ts-node": "10.9.1",
49-
"typescript": "5.0.4",
50-
"nx-cloud": "16.0.5",
51-
"@nx/devkit": "16.1.1",
52-
"@nx/workspace": "16.1.1",
53-
"@nx/js": "16.1.1",
54-
"@nx/linter": "16.1.1",
55-
"@nx/eslint-plugin": "16.1.1",
56-
"@nx/jest": "16.1.1",
57-
"@nx/plugin": "16.1.1",
58-
"@nx/angular": "16.1.1"
58+
"typescript": "5.0.4"
5959
},
6060
"dependencies": {
6161
"@angular/animations": "16.0.0",

pnpm-lock.yaml

Lines changed: 13 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"baseUrl": ".",
1717
"paths": {
1818
"@angular-three/plugin": ["libs/plugin/src/index.ts"],
19+
"angular-three": ["libs/angular-three/src/index.ts"],
1920
"angular-three-backup": ["libs/angular-three-backup/src/index.ts"]
2021
}
2122
},

0 commit comments

Comments
 (0)