Skip to content

Commit b0f58be

Browse files
committed
chore: adding Nx workspace configuration
1 parent 15bd0b2 commit b0f58be

File tree

21 files changed

+709
-0
lines changed

21 files changed

+709
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,6 @@ packages/**/size-snapshot.json
7878
.nvmrc
7979

8080
.DS_STORE
81+
82+
# NX cache
83+
.nx/

nx.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"workspaceLayout": {
4+
"libsDir": "packages",
5+
"appsDir": "apps"
6+
},
7+
"plugins": [
8+
{
9+
"plugin": "@nx/js",
10+
"options": {
11+
"typecheck": {
12+
"targetName": "typecheck"
13+
},
14+
"build": {
15+
"targetName": "build"
16+
}
17+
}
18+
},
19+
{
20+
"plugin": "@nx/js/typescript",
21+
"options": {
22+
"typecheck": {
23+
"targetName": "typecheck"
24+
},
25+
"build": {
26+
"targetName": "build",
27+
"buildDepsName": "build-deps",
28+
"watchDepsName": "watch-deps"
29+
}
30+
}
31+
}
32+
],
33+
"release": {
34+
"projects": [
35+
"@data-driven-forms/ant-component-mapper",
36+
"@data-driven-forms/blueprint-component-mapper",
37+
"@data-driven-forms/carbon-component-mapper",
38+
"@data-driven-forms/common",
39+
"@data-driven-forms/mui-component-mapper",
40+
"@data-driven-forms/parsers",
41+
"@data-driven-forms/pf4-component-mapper",
42+
"@data-driven-forms/react-form-renderer",
43+
"@data-driven-forms/react-renderer-demo",
44+
"@data-driven-forms/suir-component-mapper"
45+
],
46+
"changelog": {
47+
"projectChangelogs": {
48+
"createRelease": "github"
49+
}
50+
},
51+
"projectsRelationship": "independent",
52+
"version": {
53+
"conventionalCommits": true,
54+
"fallbackCurrentVersionResolver": "disk"
55+
}
56+
},
57+
"namedInputs": {
58+
"sharedGlobals": ["{workspaceRoot}/.github/workflows/release.yml"],
59+
"default": ["sharedGlobals"]
60+
}
61+
}

packages/ant-component-mapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ vendor
8282
!generate-packages.js
8383
!LICENSE
8484
!package.json
85+
!project.json
8586
!README.md
8687
!tsconfig.json
8788
!generate-typings.js
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
3+
"name": "@data-driven-forms/ant-component-mapper",
4+
"root": "packages/ant-component-mapper",
5+
"sourceRoot": "packages/ant-component-mapper/src",
6+
"projectType": "library",
7+
"targets": {
8+
"build": {
9+
"executor": "nx:run-commands",
10+
"outputs": [
11+
"{projectRoot}/index.js",
12+
"{projectRoot}/esm",
13+
"{projectRoot}/*.d.ts"
14+
],
15+
"options": {
16+
"command": "yarn build",
17+
"cwd": "packages/ant-component-mapper"
18+
},
19+
"dependsOn": ["^build"],
20+
"cache": true
21+
},
22+
"build:cjs": {
23+
"executor": "nx:run-commands",
24+
"outputs": ["{projectRoot}/*.js"],
25+
"options": {
26+
"command": "yarn build:cjs",
27+
"cwd": "packages/ant-component-mapper"
28+
},
29+
"cache": true
30+
},
31+
"build:esm": {
32+
"executor": "nx:run-commands",
33+
"outputs": ["{projectRoot}/esm"],
34+
"options": {
35+
"command": "yarn build:esm",
36+
"cwd": "packages/ant-component-mapper"
37+
},
38+
"cache": true
39+
},
40+
"test": {
41+
"executor": "nx:run-commands",
42+
"options": {
43+
"command": "yarn test",
44+
"cwd": "packages/ant-component-mapper"
45+
},
46+
"cache": true
47+
},
48+
"typecheck": {
49+
"executor": "@nx/js:tsc",
50+
"options": {
51+
"main": "packages/ant-component-mapper/src/index.js",
52+
"tsConfig": "packages/ant-component-mapper/tsconfig.json",
53+
"outputPath": "packages/ant-component-mapper/dist"
54+
},
55+
"outputs": ["{options.outputPath}"],
56+
"cache": true
57+
},
58+
"start": {
59+
"executor": "nx:run-commands",
60+
"options": {
61+
"command": "yarn start",
62+
"cwd": "packages/ant-component-mapper"
63+
}
64+
},
65+
"vendor": {
66+
"executor": "nx:run-commands",
67+
"options": {
68+
"command": "yarn vendor",
69+
"cwd": "packages/ant-component-mapper"
70+
}
71+
}
72+
},
73+
"implicitDependencies": ["@data-driven-forms/common"]
74+
}

packages/blueprint-component-mapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ vendor
8383
!generate-packages.js
8484
!LICENSE
8585
!package.json
86+
!project.json
8687
!README.md
8788
!tsconfig.json
8889
!generate-typings.js
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
3+
"name": "@data-driven-forms/blueprint-component-mapper",
4+
"root": "packages/blueprint-component-mapper",
5+
"sourceRoot": "packages/blueprint-component-mapper/src",
6+
"projectType": "library",
7+
"tags": ["type:component-mapper", "ui:blueprint", "scope:publishable", "platform:react"],
8+
"targets": {
9+
"build": {
10+
"executor": "nx:run-commands",
11+
"outputs": [
12+
"{projectRoot}/index.js",
13+
"{projectRoot}/esm",
14+
"{projectRoot}/*.d.ts"
15+
],
16+
"options": {
17+
"command": "yarn build",
18+
"cwd": "packages/blueprint-component-mapper"
19+
},
20+
"dependsOn": ["^build"],
21+
"cache": true
22+
},
23+
"build:cjs": {
24+
"executor": "nx:run-commands",
25+
"outputs": ["{projectRoot}/*.js"],
26+
"options": {
27+
"command": "yarn build:cjs",
28+
"cwd": "packages/blueprint-component-mapper"
29+
},
30+
"cache": true
31+
},
32+
"build:esm": {
33+
"executor": "nx:run-commands",
34+
"outputs": ["{projectRoot}/esm"],
35+
"options": {
36+
"command": "yarn build:esm",
37+
"cwd": "packages/blueprint-component-mapper"
38+
},
39+
"cache": true
40+
},
41+
"test": {
42+
"executor": "nx:run-commands",
43+
"options": {
44+
"command": "yarn test",
45+
"cwd": "packages/blueprint-component-mapper"
46+
},
47+
"cache": true
48+
},
49+
"typecheck": {
50+
"executor": "@nx/js:tsc",
51+
"options": {
52+
"main": "packages/blueprint-component-mapper/src/index.js",
53+
"tsConfig": "packages/blueprint-component-mapper/tsconfig.json",
54+
"outputPath": "packages/blueprint-component-mapper/dist"
55+
},
56+
"outputs": ["{options.outputPath}"],
57+
"cache": true
58+
},
59+
"start": {
60+
"executor": "nx:run-commands",
61+
"options": {
62+
"command": "yarn start",
63+
"cwd": "packages/blueprint-component-mapper"
64+
}
65+
}
66+
},
67+
"implicitDependencies": ["@data-driven-forms/common"]
68+
}

packages/carbon-component-mapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ vendor
8383
!generate-packages.js
8484
!LICENSE
8585
!package.json
86+
!project.json
8687
!README.md
8788
!tsconfig.json
8889
!generate-typings.js
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
3+
"name": "@data-driven-forms/carbon-component-mapper",
4+
"root": "packages/carbon-component-mapper",
5+
"sourceRoot": "packages/carbon-component-mapper/src",
6+
"projectType": "library",
7+
"tags": ["type:component-mapper", "ui:carbon", "scope:publishable", "platform:react"],
8+
"targets": {
9+
"build": {
10+
"executor": "nx:run-commands",
11+
"outputs": [
12+
"{projectRoot}/index.js",
13+
"{projectRoot}/esm",
14+
"{projectRoot}/*.d.ts"
15+
],
16+
"options": {
17+
"command": "yarn build",
18+
"cwd": "packages/carbon-component-mapper"
19+
},
20+
"dependsOn": ["^build"],
21+
"cache": true
22+
},
23+
"build:cjs": {
24+
"executor": "nx:run-commands",
25+
"outputs": ["{projectRoot}/*.js"],
26+
"options": {
27+
"command": "yarn build:cjs",
28+
"cwd": "packages/carbon-component-mapper"
29+
},
30+
"cache": true
31+
},
32+
"build:esm": {
33+
"executor": "nx:run-commands",
34+
"outputs": ["{projectRoot}/esm"],
35+
"options": {
36+
"command": "yarn build:esm",
37+
"cwd": "packages/carbon-component-mapper"
38+
},
39+
"cache": true
40+
},
41+
"test": {
42+
"executor": "nx:run-commands",
43+
"options": {
44+
"command": "yarn test",
45+
"cwd": "packages/carbon-component-mapper"
46+
},
47+
"cache": true
48+
},
49+
"typecheck": {
50+
"executor": "@nx/js:tsc",
51+
"options": {
52+
"main": "packages/carbon-component-mapper/src/index.js",
53+
"tsConfig": "packages/carbon-component-mapper/tsconfig.json",
54+
"outputPath": "packages/carbon-component-mapper/dist"
55+
},
56+
"outputs": ["{options.outputPath}"],
57+
"cache": true
58+
},
59+
"start": {
60+
"executor": "nx:run-commands",
61+
"options": {
62+
"command": "yarn start",
63+
"cwd": "packages/carbon-component-mapper"
64+
}
65+
}
66+
},
67+
"implicitDependencies": ["@data-driven-forms/common"]
68+
}

packages/common/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ vendor
8383
!generate-packages.js
8484
!LICENSE
8585
!package.json
86+
!project.json
8687
!README.md
8788
!tsconfig.json
8889
!generate-typings.js

packages/common/project.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
3+
"name": "@data-driven-forms/common",
4+
"root": "packages/common",
5+
"sourceRoot": "packages/common/src",
6+
"projectType": "library",
7+
"tags": ["type:utility", "scope:shared", "platform:react"],
8+
"targets": {
9+
"build": {
10+
"executor": "nx:run-commands",
11+
"outputs": [
12+
"{projectRoot}/index.js",
13+
"{projectRoot}/esm",
14+
"{projectRoot}/*.d.ts"
15+
],
16+
"options": {
17+
"command": "yarn build",
18+
"cwd": "packages/common"
19+
},
20+
"cache": true
21+
},
22+
"build:cjs": {
23+
"executor": "nx:run-commands",
24+
"outputs": ["{projectRoot}/*.js"],
25+
"options": {
26+
"command": "yarn build:cjs",
27+
"cwd": "packages/common"
28+
},
29+
"cache": true
30+
},
31+
"build:esm": {
32+
"executor": "nx:run-commands",
33+
"outputs": ["{projectRoot}/esm"],
34+
"options": {
35+
"command": "yarn build:esm",
36+
"cwd": "packages/common"
37+
},
38+
"cache": true
39+
},
40+
"test": {
41+
"executor": "nx:run-commands",
42+
"options": {
43+
"command": "yarn test",
44+
"cwd": "packages/common"
45+
},
46+
"cache": true
47+
},
48+
"typecheck": {
49+
"executor": "@nx/js:tsc",
50+
"options": {
51+
"main": "packages/common/src/index.js",
52+
"tsConfig": "packages/common/tsconfig.json",
53+
"outputPath": "packages/common/dist"
54+
},
55+
"outputs": ["{options.outputPath}"],
56+
"cache": true
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)