Skip to content

Commit 2214a30

Browse files
committed
feat: use @nrwl/devkit
1 parent 95e8c3f commit 2214a30

File tree

177 files changed

+2759
-5829
lines changed

Some content is hidden

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

177 files changed

+2759
-5829
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# dependencies
99
/node_modules
10+
.npmrc
1011

1112
# IDEs and editors
1213
/.idea

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/nx/LICENSE

e2e/nx-e2e/project.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"projectType": "application",
3+
"root": "e2e/nx-e2e",
4+
"sourceRoot": "e2e/nx-e2e/src",
5+
"targets": {
6+
"e2e": {
7+
"executor": "@nrwl/nx-plugin:e2e",
8+
"options": {
9+
"target": "nx:build",
10+
"npmPackageName": "@nativescript/nx",
11+
"pluginOutputPath": "dist/packages/nx",
12+
"jestConfig": "e2e/nx-e2e/jest.config.js"
13+
}
14+
}
15+
},
16+
"tags": [],
17+
"implicitDependencies": ["nx"]
18+
}

nx.json

+5-10
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,11 @@
1818
"default": {
1919
"runner": "@nrwl/workspace/tasks-runners/default",
2020
"options": {
21-
"cacheableOperations": ["build", "lint", "test", "e2e"]
21+
"cacheableOperations": ["build", "lint", "test", "e2e"],
22+
"parallel": 1
2223
}
2324
}
2425
},
25-
"projects": {
26-
"nx": {
27-
"tags": []
28-
},
29-
"nx-e2e": {
30-
"tags": [],
31-
"implicitDependencies": ["nx"]
32-
}
33-
},
3426
"workspaceLayout": {
3527
"appsDir": "e2e",
3628
"libsDir": "packages"
@@ -42,5 +34,8 @@
4234
"projects": "dependencies"
4335
}
4436
]
37+
},
38+
"cli": {
39+
"defaultCollection": "@nrwl/workspace"
4540
}
4641
}

package.json

+12-14
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,15 @@
3131
},
3232
"private": true,
3333
"devDependencies": {
34-
"@angular-devkit/architect": "^0.1200.0",
35-
"@angular-devkit/core": "^12.0.0",
36-
"@angular-devkit/schematics": "^12.0.0",
37-
"@nrwl/cli": "12.9.0",
38-
"@nrwl/eslint-plugin-nx": "12.9.0",
39-
"@nrwl/jest": "12.9.0",
40-
"@nrwl/nx-plugin": "12.9.0",
41-
"@nrwl/tao": "12.9.0",
42-
"@nrwl/workspace": "12.9.0",
43-
"@types/jest": "26.0.8",
44-
"@types/node": "14.14.33",
34+
"@nrwl/angular": "13.4.6",
35+
"@nrwl/cli": "13.4.6",
36+
"@nrwl/eslint-plugin-nx": "13.4.6",
37+
"@nrwl/jest": "13.4.6",
38+
"@nrwl/nx-plugin": "13.4.6",
39+
"@nrwl/tao": "13.4.6",
40+
"@nrwl/workspace": "13.4.6",
41+
"@types/jest": "27.0.2",
42+
"@types/node": "^16.0.0",
4543
"@typescript-eslint/eslint-plugin": "^4.3.0",
4644
"@typescript-eslint/parser": "^4.3.0",
4745
"conventional-changelog-cli": "^2.1.1",
@@ -50,13 +48,13 @@
5048
"dotenv": "10.0.0",
5149
"eslint": "7.22.0",
5250
"eslint-config-prettier": "8.1.0",
53-
"jest": "27.0.3",
51+
"jest": "27.2.3",
5452
"jsonc-parser": "3.0.0",
5553
"prettier": "2.4.1",
56-
"ts-jest": "27.0.3",
54+
"ts-jest": "27.0.5",
5755
"ts-node": "9.1.1",
5856
"tslint": "6.1.3",
59-
"typescript": "4.3.5"
57+
"typescript": "4.5.5"
6058
}
6159
}
6260

packages/nx/LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright OpenJS Foundation and other contributors, https://openjsf.org
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

packages/nx/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ npx nx run <app-name>:ios
110110

111111
#### Configuration options
112112

113-
A custom builder is provided via `@nativescript/nx:build` with the following options:
113+
A custom executor is provided via `@nativescript/nx:build` with the following options:
114114

115115
```
116116
"debug": {
@@ -201,7 +201,7 @@ Here's an example app config:
201201
"prefix": "",
202202
"targets": {
203203
"build": {
204-
"builder": "@nativescript/nx:build",
204+
"executor": "@nativescript/nx:build",
205205
"options": {
206206
"noHmr": true,
207207
"production": true,
@@ -221,7 +221,7 @@ Here's an example app config:
221221
}
222222
},
223223
"ios": {
224-
"builder": "@nativescript/nx:build",
224+
"executor": "@nativescript/nx:build",
225225
"options": {
226226
"platform": "ios"
227227
},
@@ -236,7 +236,7 @@ Here's an example app config:
236236
}
237237
},
238238
"android": {
239-
"builder": "@nativescript/nx:build",
239+
"executor": "@nativescript/nx:build",
240240
"options": {
241241
"platform": "android"
242242
},
@@ -266,7 +266,7 @@ Here's an example app config:
266266
}
267267
},
268268
"clean": {
269-
"builder": "@nativescript/nx:build",
269+
"executor": "@nativescript/nx:build",
270270
"options": {
271271
"clean": true
272272
}

packages/nx/builders.json

-15
This file was deleted.

packages/nx/collection.json

-31
This file was deleted.

packages/nx/executors.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "http://json-schema.org/schema",
3+
"executors": {
4+
"build": {
5+
"implementation": "./src/executors/build/executor",
6+
"schema": "./src/executors/build/schema.json",
7+
"description": "NativeScript builder"
8+
},
9+
"test": {
10+
"implementation": "./src/executors/test/executor",
11+
"schema": "./src/executors/test/schema.json",
12+
"description": "Start the NativeScript unit test runner"
13+
}
14+
},
15+
"builders": {
16+
"build": {
17+
"implementation": "./src/executors/build/builder",
18+
"schema": "./src/executors/build/schema.json",
19+
"description": "build executor"
20+
},
21+
"test": {
22+
"implementation": "./src/executors/test/builder",
23+
"schema": "./src/executors/test/schema.json",
24+
"description": "test executor"
25+
}
26+
}
27+
}

packages/nx/generators.json

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"$schema": "http://json-schema.org/schema",
3+
"name": "NativeScript Nx",
4+
"version": "3.0",
5+
"generators": {
6+
"init": {
7+
"factory": "./src/generators/init/init",
8+
"schema": "./src/generators/init/schema.json",
9+
"description": "Initialize @nativescript/nx",
10+
"aliases": ["ng-add"],
11+
"hidden": true
12+
},
13+
"application": {
14+
"factory": "./src/generators/application/application",
15+
"schema": "./src/generators/application/schema.json",
16+
"description": "Create an application",
17+
"aliases": ["app"],
18+
"x-type": "application"
19+
},
20+
"library": {
21+
"factory": "./src/generators/library/library",
22+
"schema": "./src/generators/library/schema.json",
23+
"description": "Create a library",
24+
"aliases": ["lib"],
25+
"x-type": "library"
26+
},
27+
"app-resources": {
28+
"factory": "./src/generators/app-resources/app-resources",
29+
"schema": "./src/generators/app-resources/schema.json",
30+
"description": "Create app resources for NativeScript app.",
31+
"hidden": true
32+
}
33+
},
34+
"schematics": {
35+
"init": {
36+
"factory": "./src/generators/init/compat",
37+
"schema": "./src/generators/init/schema.json",
38+
"description": "Initialize @nativescript/nx",
39+
"aliases": ["ng-add"],
40+
"hidden": true
41+
},
42+
"application": {
43+
"factory": "./src/generators/application/compat",
44+
"schema": "./src/generators/application/schema.json",
45+
"description": "Create an application",
46+
"aliases": ["app"],
47+
"x-type": "application"
48+
},
49+
"library": {
50+
"factory": "./src/generators/library/compat",
51+
"schema": "./src/generators/library/schema.json",
52+
"description": "Create a library",
53+
"aliases": ["lib"],
54+
"x-type": "library"
55+
},
56+
"app-resources": {
57+
"factory": "./src/generators/app-resources/compat",
58+
"schema": "./src/generators/app-resources/schema.json",
59+
"description": "Create app resources for NativeScript app.",
60+
"hidden": true
61+
}
62+
}
63+
}

packages/nx/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/nx",
3-
"version": "2.0.8",
3+
"version": "3.0.8",
44
"description": "NativeScript Plugin for Nx",
55
"repository": {
66
"type": "git",
@@ -16,8 +16,8 @@
1616
],
1717
"main": "src/index.js",
1818
"types": "src/index.d.ts",
19-
"builders": "./builders.json",
20-
"schematics": "./collection.json",
19+
"schematics": "./generators.json",
20+
"builders": "./executors.json",
2121
"author": "NativeScript TSC",
2222
"license": "Apache-2.0",
2323
"bugs": {
@@ -28,9 +28,9 @@
2828
"migrations": "./migrations.json"
2929
},
3030
"dependencies": {
31-
"@angular-devkit/architect": "^0.1200.0",
32-
"@angular-devkit/core": "^12.0.0",
33-
"@angular-devkit/schematics": "^12.0.0",
31+
"@angular-devkit/architect": "^0.1300.0",
32+
"@angular-devkit/core": "^13.0.0",
33+
"@angular-devkit/schematics": "^13.0.0",
3434
"fs-extra": "^9.1.0",
3535
"ignore": "^5.0.4",
3636
"jsonc-parser": "3.0.0"

0 commit comments

Comments
 (0)