Skip to content

Commit d56ecc4

Browse files
committed
feat: upgrade to workspace v2 + move to project-based config
1 parent 90d3286 commit d56ecc4

File tree

3 files changed

+83
-82
lines changed

3 files changed

+83
-82
lines changed

apps\ddd-e2e/project.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"projectType": "application",
3+
"root": "apps\\ddd-e2e",
4+
"sourceRoot": "apps\\ddd-e2e/src",
5+
"targets": {
6+
"e2e": {
7+
"executor": "@nrwl/nx-plugin:e2e",
8+
"options": {
9+
"target": "ddd:build",
10+
"outputPath": "dist/libs/ddd",
11+
"jestConfig": "apps/ddd-e2e/jest.config.js"
12+
}
13+
}
14+
},
15+
"tags": [],
16+
"implicitDependencies": ["ddd"]
17+
}

libs/ddd/project.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"root": "libs/ddd",
3+
"sourceRoot": "libs/ddd/src",
4+
"projectType": "library",
5+
"generators": {},
6+
"targets": {
7+
"lint": {
8+
"executor": "@nrwl/linter:eslint",
9+
"options": {
10+
"lintFilePatterns": [
11+
"libs/ddd/**/*.ts",
12+
"libs/ddd/**/*.spec.ts",
13+
"libs/ddd/**/*.spec.tsx",
14+
"libs/ddd/**/*.spec.js",
15+
"libs/ddd/**/*.spec.jsx",
16+
"libs/ddd/**/*.d.ts"
17+
]
18+
},
19+
"outputs": ["{options.outputFile}"]
20+
},
21+
"test": {
22+
"executor": "@nrwl/jest:jest",
23+
"options": {
24+
"jestConfig": "libs/ddd/jest.config.js",
25+
"passWithNoTests": true
26+
},
27+
"outputs": ["coverage/libs/ddd"]
28+
},
29+
"build": {
30+
"executor": "@nrwl/node:package",
31+
"options": {
32+
"outputPath": "dist/libs/ddd",
33+
"tsConfig": "libs/ddd/tsconfig.lib.json",
34+
"packageJson": "libs/ddd/package.json",
35+
"main": "libs/ddd/src/index.ts",
36+
"assets": [
37+
{
38+
"input": "./libs/ddd",
39+
"glob": "**/*.*",
40+
"output": "./libs/ddd"
41+
},
42+
"libs/ddd/*.md",
43+
{
44+
"input": "./libs/ddd/src",
45+
"glob": "**/*.*",
46+
"output": "./libs/ddd/src"
47+
},
48+
{
49+
"input": "./libs/ddd",
50+
"glob": "collection.json",
51+
"output": "."
52+
},
53+
{
54+
"input": "./libs/ddd",
55+
"glob": "builders.json",
56+
"output": "."
57+
}
58+
]
59+
}
60+
}
61+
},
62+
"tags": []
63+
}

workspace.json

Lines changed: 3 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,7 @@
11
{
2-
"version": 1,
2+
"version": 2,
33
"projects": {
4-
"ddd": {
5-
"root": "libs/ddd",
6-
"sourceRoot": "libs/ddd/src",
7-
"projectType": "library",
8-
"schematics": {},
9-
"architect": {
10-
"lint": {
11-
"builder": "@nrwl/linter:eslint",
12-
"options": {
13-
"lintFilePatterns": [
14-
"libs/ddd/**/*.ts",
15-
"libs/ddd/**/*.spec.ts",
16-
"libs/ddd/**/*.spec.tsx",
17-
"libs/ddd/**/*.spec.js",
18-
"libs/ddd/**/*.spec.jsx",
19-
"libs/ddd/**/*.d.ts"
20-
]
21-
},
22-
"outputs": ["{options.outputFile}"]
23-
},
24-
"test": {
25-
"builder": "@nrwl/jest:jest",
26-
"options": {
27-
"jestConfig": "libs/ddd/jest.config.js",
28-
"passWithNoTests": true
29-
},
30-
"outputs": ["coverage/libs/ddd"]
31-
},
32-
"build": {
33-
"builder": "@nrwl/node:package",
34-
"options": {
35-
"outputPath": "dist/libs/ddd",
36-
"tsConfig": "libs/ddd/tsconfig.lib.json",
37-
"packageJson": "libs/ddd/package.json",
38-
"main": "libs/ddd/src/index.ts",
39-
"assets": [
40-
{
41-
"input": "./libs/ddd",
42-
"glob": "**/*.*",
43-
"output": "./libs/ddd"
44-
},
45-
"libs/ddd/*.md",
46-
{
47-
"input": "./libs/ddd/src",
48-
"glob": "**/*.*",
49-
"output": "./libs/ddd/src"
50-
},
51-
{
52-
"input": "./libs/ddd",
53-
"glob": "collection.json",
54-
"output": "."
55-
},
56-
{
57-
"input": "./libs/ddd",
58-
"glob": "builders.json",
59-
"output": "."
60-
}
61-
]
62-
}
63-
}
64-
},
65-
"tags": []
66-
},
67-
"ddd-e2e": {
68-
"projectType": "application",
69-
"root": "apps\\ddd-e2e",
70-
"sourceRoot": "apps\\ddd-e2e/src",
71-
"architect": {
72-
"e2e": {
73-
"builder": "@nrwl/nx-plugin:e2e",
74-
"options": {
75-
"target": "ddd:build",
76-
"npmPackageName": "@angular-architects/ddd",
77-
"pluginOutputPath": "dist/libs/ddd",
78-
"jestConfig": "apps/ddd-e2e/jest.config.js"
79-
}
80-
}
81-
},
82-
"tags": [],
83-
"implicitDependencies": ["ddd"]
84-
}
4+
"ddd": "libs/ddd",
5+
"ddd-e2e": "apps/ddd-e2e"
856
}
867
}

0 commit comments

Comments
 (0)