Skip to content

Commit 1a746ea

Browse files
committed
feat: add plugin
1 parent 3b9b8e4 commit 1a746ea

25 files changed

+1345
-85
lines changed

.eslintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"jest": true
3838
},
3939
"rules": {}
40+
},
41+
{
42+
"files": "*.json",
43+
"parser": "jsonc-eslint-parser",
44+
"rules": {}
4045
}
4146
]
4247
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.validate": ["json"]
3+
}

apps/plugin-e2e/jest.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'plugin-e2e',
4+
preset: '../../jest.preset.js',
5+
globals: {
6+
'ts-jest': {
7+
tsconfig: '<rootDir>/tsconfig.spec.json',
8+
},
9+
},
10+
transform: {
11+
'^.+\\.[tj]s$': 'ts-jest',
12+
},
13+
moduleFileExtensions: ['ts', 'js', 'html'],
14+
coverageDirectory: '../../coverage/apps/plugin-e2e',
15+
};

apps/plugin-e2e/project.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "plugin-e2e",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"sourceRoot": "apps/plugin-e2e/src",
6+
"targets": {
7+
"e2e": {
8+
"executor": "@nrwl/nx-plugin:e2e",
9+
"options": {
10+
"target": "plugin:build",
11+
"jestConfig": "apps/plugin-e2e/jest.config.ts"
12+
}
13+
}
14+
},
15+
"tags": [],
16+
"implicitDependencies": ["plugin"]
17+
}

apps/plugin-e2e/tests/plugin.spec.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { ensureNxProject, runNxCommandAsync } from '@nrwl/nx-plugin/testing';
2+
3+
describe('plugin e2e', () => {
4+
// Setting up individual workspaces per
5+
// test can cause e2e runs to take a long time.
6+
// For this reason, we recommend each suite only
7+
// consumes 1 workspace. The tests should each operate
8+
// on a unique project in the workspace, such that they
9+
// are not dependant on one another.
10+
beforeAll(() => {
11+
ensureNxProject('angular-three-postprocessing-plugin', 'dist/libs/plugin');
12+
});
13+
14+
afterAll(() => {
15+
// `nx reset` kills the daemon, and performs
16+
// some work which can help clean up e2e leftovers
17+
runNxCommandAsync('reset');
18+
});
19+
});

apps/plugin-e2e/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"files": [],
4+
"include": [],
5+
"references": [
6+
{
7+
"path": "./tsconfig.spec.json"
8+
}
9+
]
10+
}

apps/plugin-e2e/tsconfig.spec.json

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

libs/angular-three-postprocessing/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
"postprocessing": "^6.0.0"
2828
},
2929
"dependencies": {
30+
"@nrwl/devkit": "^15.0.0",
3031
"tslib": "^2.3.0"
3132
},
32-
"sideEffects": false
33+
"sideEffects": false,
34+
"generators": "./plugin/generators.json",
35+
"schematics": "./plugin/generators.json"
3336
}

libs/plugin/.eslintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
},
17+
{
18+
"files": ["./package.json", "./generators.json", "./executors.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nrwl/nx/nx-plugin-checks": "error"
22+
}
23+
}
24+
]
25+
}

libs/plugin/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# plugin
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Building
6+
7+
Run `nx build plugin` to build the library.
8+
9+
## Running unit tests
10+
11+
Run `nx test plugin` to execute the unit tests via [Jest](https://jestjs.io).

0 commit comments

Comments
 (0)