Skip to content

Commit 982eaa5

Browse files
committed
chore(scripts/,tools/): use workspace inferred task plugins
1 parent 04dd27b commit 982eaa5

File tree

29 files changed

+49
-206
lines changed

29 files changed

+49
-206
lines changed

nx.json

+22-17
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,7 @@
7676
"command": "eslint src"
7777
}
7878
},
79-
"format": {
80-
"executor": "nx:run-commands",
81-
"options": {
82-
"command": "prettier --write {projectRoot}"
83-
},
84-
"metadata": {
85-
"help": {
86-
"command": "yarn prettier --help",
87-
"options": {}
88-
}
89-
},
90-
"configurations": {
91-
"check": {
92-
"command": "prettier --check {projectRoot}"
93-
}
94-
}
95-
},
79+
"format": {},
9680
"verify-packaging": {
9781
"dependsOn": ["build"],
9882
"cache": true
@@ -149,6 +133,27 @@
149133
"targetName": "lint"
150134
},
151135
"include": ["tools/**/*", "scripts/**/*"]
136+
},
137+
{
138+
"plugin": "./tools/workspace-plugin/src/plugins/format-plugin.ts",
139+
"options": {
140+
"targetName": "format"
141+
},
142+
"include": ["tools/**/*", "scripts/**/*"]
143+
},
144+
{
145+
"plugin": "./tools/workspace-plugin/src/plugins/type-check-plugin.ts",
146+
"options": {
147+
"targetName": "type-check"
148+
},
149+
"include": ["tools/**/*", "scripts/**/*"]
150+
},
151+
{
152+
"plugin": "./tools/workspace-plugin/src/plugins/clean-plugin.ts",
153+
"options": {
154+
"targetName": "clean"
155+
},
156+
"include": ["tools/**/*", "scripts/**/*"]
152157
}
153158
]
154159
}

scripts/api-extractor/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/api-extractor",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/babel/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/babel/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/beachball/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/beachball/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/cypress/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/cypress/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/dangerjs/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/dangerjs/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/executors/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/executors/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/fluentui-publish/project.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
"{workspaceRoot}/jest.preset.js",
1313
"{workspaceRoot}/packages/fluentui/*/project.json"
1414
]
15-
},
16-
"type-check": {
17-
"executor": "@fluentui/workspace-plugin:type-check"
18-
},
19-
"format": {}
15+
}
2016
}
2117
}

scripts/generators/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/generators/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/github/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/github/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/gulp/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/gulp/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/jest/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/jest/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/lint-staged/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/lint-staged/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/monorepo/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/monorepo/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/package-manager/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/package-manager/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/perf-test-flamegrill/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/perf-test-flamegrill/src",
55
"projectType": "library",
6-
"tags": ["tools", "platform:any"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools", "platform:any"]
137
}

scripts/prettier/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/prettier/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/projects-test/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/projects-test/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/puppeteer/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/puppeteer/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/storybook/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/storybook/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/tasks/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/tasks/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/test-ssr/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/test-ssr/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/triage-bot/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/triage-bot/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/ts-node/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/ts-node/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/update-release-notes/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/update-release-notes/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/utils/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/utils/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

scripts/webpack/project.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"sourceRoot": "scripts/webpack/src",
55
"projectType": "library",
6-
"tags": ["tools"],
7-
"targets": {
8-
"type-check": {
9-
"executor": "@fluentui/workspace-plugin:type-check"
10-
},
11-
"format": {}
12-
}
6+
"tags": ["tools"]
137
}

0 commit comments

Comments
 (0)