Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90aea1e

Browse files
committed
feat: add lib
1 parent 4a89411 commit 90aea1e

22 files changed

+11550
-646
lines changed

.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nrwl/nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nrwl/nx/javascript"],
32+
"rules": {}
33+
},
34+
{
35+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
36+
"env": {
37+
"jest": true
38+
},
39+
"rules": {}
40+
}
41+
]
42+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ testem.log
3737
# System Files
3838
.DS_Store
3939
Thumbs.db
40+
41+
.angular

.vscode/extensions.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"recommendations": [
3-
4-
"nrwl.angular-console",
5-
"esbenp.prettier-vscode"
6-
]
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"firsttris.vscode-jest-runner",
6+
"dbaeumer.vscode-eslint"
7+
]
78
}

jest.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { getJestProjects } from '@nrwl/jest';
2+
3+
export default {
4+
projects: getJestProjects(),
5+
};

jest.preset.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const nxPreset = require('@nrwl/jest/preset').default;
2+
3+
module.exports = { ...nxPreset };
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"rules": {
8+
"@angular-eslint/directive-selector": [
9+
"error",
10+
{
11+
"type": "attribute",
12+
"prefix": "ngtp",
13+
"style": "camelCase"
14+
}
15+
],
16+
"@angular-eslint/component-selector": [
17+
"error",
18+
{
19+
"type": "element",
20+
"prefix": "ngtp",
21+
"style": "kebab-case"
22+
}
23+
]
24+
},
25+
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
26+
},
27+
{
28+
"files": ["*.html"],
29+
"extends": ["plugin:@nrwl/nx/angular-template"],
30+
"rules": {}
31+
}
32+
]
33+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# angular-three-postprocessing
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Running unit tests
6+
7+
Run `nx test angular-three-postprocessing` to execute the unit tests.
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-postprocessing',
4+
preset: '../../jest.preset.js',
5+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6+
globals: {
7+
'ts-jest': {
8+
tsconfig: '<rootDir>/tsconfig.spec.json',
9+
stringifyContentPathRegex: '\\.(html|svg)$',
10+
},
11+
},
12+
coverageDirectory: '../../coverage/libs/angular-three-postprocessing',
13+
transform: {
14+
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
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+
};
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-postprocessing",
4+
"lib": {
5+
"entryFile": "src/index.ts"
6+
}
7+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "angular-three-postprocessing",
3+
"version": "0.0.1",
4+
"peerDependencies": {
5+
"@angular/common": "^15.1.0",
6+
"@angular/core": "^15.1.0"
7+
},
8+
"dependencies": {
9+
"tslib": "^2.3.0"
10+
},
11+
"sideEffects": false
12+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "angular-three-postprocessing",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "library",
5+
"sourceRoot": "libs/angular-three-postprocessing/src",
6+
"prefix": "ngtp",
7+
"targets": {
8+
"build": {
9+
"executor": "@nrwl/angular:package",
10+
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
11+
"options": {
12+
"project": "libs/angular-three-postprocessing/ng-package.json"
13+
},
14+
"configurations": {
15+
"production": {
16+
"tsConfig": "libs/angular-three-postprocessing/tsconfig.lib.prod.json"
17+
},
18+
"development": {
19+
"tsConfig": "libs/angular-three-postprocessing/tsconfig.lib.json"
20+
}
21+
},
22+
"defaultConfiguration": "production"
23+
},
24+
"test": {
25+
"executor": "@nrwl/jest:jest",
26+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
27+
"options": {
28+
"jestConfig": "libs/angular-three-postprocessing/jest.config.ts",
29+
"passWithNoTests": true
30+
},
31+
"configurations": {
32+
"ci": {
33+
"ci": true,
34+
"codeCoverage": true
35+
}
36+
}
37+
},
38+
"lint": {
39+
"executor": "@nrwl/linter:eslint",
40+
"outputs": ["{options.outputFile}"],
41+
"options": {
42+
"lintFilePatterns": [
43+
"libs/angular-three-postprocessing/**/*.ts",
44+
"libs/angular-three-postprocessing/**/*.html"
45+
]
46+
}
47+
}
48+
},
49+
"tags": []
50+
}

libs/angular-three-postprocessing/src/index.ts

Whitespace-only changes.

libs/angular-three-postprocessing/src/lib/effect.ts

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import 'jest-preset-angular/setup-jest';
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+
}
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/test-setup.ts", "src/**/*.spec.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+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"module": "commonjs",
6+
"types": ["jest", "node"]
7+
},
8+
"files": ["src/test-setup.ts"],
9+
"include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
10+
}

nx.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,38 @@
1313
"build": {
1414
"dependsOn": ["^build"],
1515
"inputs": ["production", "^production"]
16+
},
17+
"test": {
18+
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
19+
},
20+
"lint": {
21+
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
1622
}
1723
},
1824
"namedInputs": {
1925
"default": ["{projectRoot}/**/*", "sharedGlobals"],
20-
"production": ["default"],
26+
"production": [
27+
"default",
28+
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
29+
"!{projectRoot}/tsconfig.spec.json",
30+
"!{projectRoot}/jest.config.[jt]s",
31+
"!{projectRoot}/.eslintrc.json"
32+
],
2133
"sharedGlobals": []
34+
},
35+
"generators": {
36+
"@nrwl/angular:application": {
37+
"style": "css",
38+
"linter": "eslint",
39+
"unitTestRunner": "jest",
40+
"e2eTestRunner": "none"
41+
},
42+
"@nrwl/angular:library": {
43+
"linter": "eslint",
44+
"unitTestRunner": "jest"
45+
},
46+
"@nrwl/angular:component": {
47+
"style": "css"
48+
}
2249
}
2350
}

package.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,53 @@
55
"scripts": {},
66
"private": true,
77
"devDependencies": {
8+
"@angular-devkit/build-angular": "~15.1.3",
9+
"@angular-eslint/eslint-plugin": "~15.2.0",
10+
"@angular-eslint/eslint-plugin-template": "~15.2.0",
11+
"@angular-eslint/template-parser": "~15.2.0",
12+
"@angular/cli": "~15.1.3",
13+
"@angular/compiler-cli": "~15.1.2",
14+
"@angular/language-service": "~15.1.2",
15+
"@nrwl/angular": "^15.6.3",
16+
"@nrwl/eslint-plugin-nx": "15.6.3",
17+
"@nrwl/jest": "15.6.3",
18+
"@nrwl/linter": "15.6.3",
819
"@nrwl/workspace": "15.6.3",
20+
"@types/jest": "28.1.1",
21+
"@types/node": "18.11.18",
22+
"@typescript-eslint/eslint-plugin": "^5.49.0",
23+
"@typescript-eslint/parser": "^5.49.0",
24+
"eslint": "~8.33.0",
25+
"eslint-config-prettier": "8.6.0",
26+
"jest": "28.1.1",
27+
"jest-environment-jsdom": "28.1.1",
28+
"jest-preset-angular": "~12.2.3",
29+
"ng-packagr": "~15.1.1",
930
"nx": "15.6.3",
31+
"postcss": "^8.4.21",
32+
"postcss-import": "~15.1.0",
33+
"postcss-preset-env": "~8.0.1",
34+
"postcss-url": "~10.1.3",
1035
"prettier": "^2.8.3",
1136
"prettier-plugin-organize-imports": "^3.2.2",
37+
"ts-jest": "28.0.5",
38+
"ts-node": "10.9.1",
1239
"typescript": "~4.9.5"
40+
},
41+
"dependencies": {
42+
"@angular/animations": "~15.1.2",
43+
"@angular/common": "~15.1.2",
44+
"@angular/compiler": "~15.1.2",
45+
"@angular/core": "~15.1.2",
46+
"@angular/forms": "~15.1.2",
47+
"@angular/platform-browser": "~15.1.2",
48+
"@angular/platform-browser-dynamic": "~15.1.2",
49+
"@angular/router": "~15.1.2",
50+
"@rx-angular/state": "^1.7.0",
51+
"angular-three": "^1.2.2",
52+
"postprocessing": "^6.29.3",
53+
"rxjs": "~7.8.0",
54+
"tslib": "^2.5.0",
55+
"zone.js": "~0.12.0"
1356
}
1457
}

0 commit comments

Comments
 (0)