Skip to content

Commit 633382b

Browse files
committed
build: sync nx base files with latest
1 parent c342224 commit 633382b

7 files changed

+50
-143
lines changed

.prettierignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
*.js
44
*.json
55
*.jsonc
6-
/.nx/cache
6+
/dist
7+
/coverage
8+
/.nx/cache
9+
.angular

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![MIT badge](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
44
![Circle CI](https://img.shields.io/circleci/build/github/matheo/angular?token=6b2b1dc42fc44f80fdae3e70f1c4f170f35419fd)
55

6-
This project is a sandbox to play with Angular and Nx, improve my coding standards and release some open source stuff.
6+
This project is a sandbox to play with Angular and Nx, to improve my coding standards and release some open source stuff.
77

88
## @matheo/datasource
99

decorate-angular-cli.js

-79
This file was deleted.

jest.config.js

-5
This file was deleted.

jest.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { getJestProjectsAsync } from '@nx/jest';
2+
3+
export default async () => ({
4+
projects: await getJestProjectsAsync(),
5+
});

jest.preset.js

+2-21
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
const nxPreset = require('@nx/jest/preset');
1+
const nxPreset = require('@nx/jest/preset').default;
22

3-
module.exports = {
4-
...nxPreset,
5-
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
6-
transform: {
7-
'^.+\\.(ts|js|html)$': 'ts-jest',
8-
},
9-
resolver: '@nx/jest/plugins/resolver',
10-
moduleFileExtensions: ['ts', 'js', 'html'],
11-
coverageReporters: ['html'],
12-
/* TODO: Update to latest Jest snapshotFormat
13-
* By default Nx has kept the older style of Jest Snapshot formats
14-
* to prevent breaking of any existing tests with snapshots.
15-
* It's recommend you update to the latest format.
16-
* You can do this by removing snapshotFormat property
17-
* and running tests with --update-snapshot flag.
18-
* Example: "nx affected --targets=test --update-snapshot"
19-
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
20-
*/
21-
snapshotFormat: { escapeString: true, printBasicPrototype: true },
22-
};
3+
module.exports = { ...nxPreset };

nx.json

+38-36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "node_modules/nx/schemas/nx-schema.json",
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"defaultBase": "master",
44
"defaultProject": "website",
55
"nxCloudAccessToken": "YzliYTY2ZmItMzI5Zi00ZmY2LWJjOGQtZTgxZTJiMDg3Y2QwfHJlYWQtd3JpdGU=",
@@ -9,57 +9,28 @@
99
"versionMismatch": false
1010
}
1111
},
12-
"tasksRunnerOptions": {
13-
"default": {
14-
"runner": "@nx/workspace/tasks-runners/default",
15-
"options": {}
16-
}
17-
},
18-
"targetDependencies": {
19-
"build": [
20-
{
21-
"target": "build",
22-
"projects": "dependencies"
23-
}
24-
]
25-
},
26-
"generators": {
27-
"@nx/angular:application": {
28-
"style": "scss",
29-
"linter": "tslint",
30-
"unitTestRunner": "jest"
31-
},
32-
"@nx/angular:library": {
33-
"style": "scss",
34-
"linter": "tslint",
35-
"unitTestRunner": "jest",
36-
"strict": true
37-
},
38-
"@schematics/angular:component": {
39-
"style": "scss",
40-
"changeDetection": "OnPush"
41-
}
42-
},
4312
"namedInputs": {
4413
"default": ["{projectRoot}/**/*", "sharedGlobals"],
4514
"sharedGlobals": [
46-
"{workspaceRoot}/angular.json",
4715
"{workspaceRoot}/tslint.json",
4816
"{workspaceRoot}/nx.json",
4917
"{workspaceRoot}/tsconfig.base.json"
5018
],
5119
"production": [
5220
"default",
21+
"!{projectRoot}/.eslintrc.json",
22+
"!{projectRoot}/eslint.config.js",
5323
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
5424
"!{projectRoot}/tsconfig.spec.json",
5525
"!{projectRoot}/jest.config.[jt]s",
56-
"!{projectRoot}/src/test-setup.[jt]s"
26+
"!{projectRoot}/src/test-setup.[jt]s",
27+
"!{projectRoot}/test-setup.[jt]s"
5728
]
5829
},
5930
"targetDefaults": {
6031
"build": {
61-
"inputs": ["production", "^production"],
62-
"cache": true
32+
"cache": true,
33+
"inputs": ["production", "^production"]
6334
},
6435
"e2e": {
6536
"cache": true,
@@ -79,5 +50,36 @@
7950
}
8051
}
8152
},
53+
"tasksRunnerOptions": {
54+
"default": {
55+
"runner": "@nx/workspace/tasks-runners/default",
56+
"options": {}
57+
}
58+
},
59+
"targetDependencies": {
60+
"build": [
61+
{
62+
"target": "build",
63+
"projects": "dependencies"
64+
}
65+
]
66+
},
67+
"generators": {
68+
"@nx/angular:application": {
69+
"style": "scss",
70+
"linter": "tslint",
71+
"unitTestRunner": "jest"
72+
},
73+
"@nx/angular:library": {
74+
"style": "scss",
75+
"linter": "tslint",
76+
"unitTestRunner": "jest",
77+
"strict": true
78+
},
79+
"@nx/angular:component": {
80+
"style": "scss",
81+
"changeDetection": "OnPush"
82+
}
83+
},
8284
"parallel": 1
8385
}

0 commit comments

Comments
 (0)