Skip to content

Commit e52214f

Browse files
committed
chore(vscode-extension): optimize collectCoverageFrom generation
1 parent 57a4bb2 commit e52214f

31 files changed

Lines changed: 316 additions & 321 deletions

.github/workflows/pull-request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
- run: yarn install --frozen-lockfile
3636
- run: yarn test:affected
3737
- uses: codecov/codecov-action@v3
38+
with:
39+
directory: './coverage/packages/'
3840
build:
3941
runs-on: ubuntu-latest
4042
strategy:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
!.vscode/README.md
2424
!.vscode/recommended-settings.json
2525
!.vscode/extensions.json
26+
!.vscode/launch.json
27+
!.vscode/tasks.json
2628

2729
# misc
2830
/.sass-cache

.stylelintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
/coverage
44
/.yarn
55
/packages/site/dist
6-
/packages/site/src/app/routes

.stylelintrc

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@
66
"stylelint-config-prettier"
77
],
88
"rules": {
9-
"selector-type-no-unknown": [
10-
true,
11-
{
12-
"ignoreTypes": ["/^d-/"]
13-
}
14-
],
15-
"declaration-property-value-allowed-list": {
16-
"/color/": ["/var/", "/\\$/", "currentcolor", "transparent", "unset", "inherit"],
17-
"font-size": ["/var/", "/\\$/", "/[0-9]+em$/", "unset", "inherit"],
18-
"border-radius": ["/var/", "/\\$/", "50%", "0", "inherit"]
19-
},
20-
"declaration-property-value-disallowed-list": {
21-
"transition": ["/all/", "/[0-9]ms/"]
22-
},
239
"custom-property-pattern": null,
2410
"no-invalid-position-at-import-rule": null,
2511
"selector-class-pattern": null
@@ -29,6 +15,14 @@
2915
"files": ["*.scss", "**/*.scss"],
3016
"rules": {
3117
"function-no-unknown": null,
18+
"declaration-property-value-allowed-list": {
19+
"/color/": ["/var/", "/\\$/", "currentcolor", "transparent", "unset", "inherit"],
20+
"font-size": ["/var/", "/\\$/", "/[0-9]+em$/", "unset", "inherit"],
21+
"border-radius": ["/var/", "/\\$/", "50%", "0", "inherit"]
22+
},
23+
"declaration-property-value-disallowed-list": {
24+
"transition": ["/all/", "/[0-9]ms/"]
25+
},
3226
"annotation-no-unknown": [
3327
true,
3428
{

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": ["--extensionDevelopmentPath=${workspaceFolder}/dist/packages/vscode-extension"],
13+
"outFiles": ["${workspaceFolder}/dist/packages/vscode-extension/**/*.js"],
14+
"preLaunchTask": "watch:vscode-extension"
15+
}
16+
]
17+
}

.vscode/tasks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "watch:vscode-extension",
8+
"type": "npm",
9+
"script": "watch:vscode-extension",
10+
"problemMatcher": "$tsc-watch",
11+
"isBackground": true,
12+
"presentation": {
13+
"reveal": "never"
14+
},
15+
"group": "build"
16+
}
17+
]
18+
}

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44

55
const message = process.env['HUSKY_GIT_PARAMS'];
66
const types = ['feat', 'fix', 'chore', 'docs', 'style', 'refactor', 'perf', 'test'];
7-
const scopes = ['hooks', 'icons', 'site', 'ui', 'utils'];
7+
const scopes = ['hooks', 'icons', 'site', 'ui', 'utils', 'vscode-extension'];
88

99
function parseMessage(message) {
1010
const PATTERN = /^(\w*)(?:\((.*)\))?!?: (.*)$/;

package.json

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,34 @@
11
{
2-
"private": true,
32
"name": "react-devui",
43
"version": "0.0.0",
5-
"license": "MIT",
4+
"private": true,
65
"description": "React Component Library",
76
"homepage": "https://github.com/DevCloudFE/react-devui",
8-
"engines": {
9-
"node": "14.x || 16.x",
10-
"yarn": ">=1.22.4 <2",
11-
"npm": "Please use yarn instead of NPM to install dependencies"
12-
},
7+
"license": "MIT",
8+
"workspaces": [
9+
"packages/*"
10+
],
1311
"scripts": {
14-
"site:serve": "nx serve site",
15-
"lint:affected": "nx affected --target=lint --parallel=5",
16-
"lint:affected:fix": "yarn lint:affected --fix",
17-
"lint:style": "stylelint **/*.{css,scss,html,md}",
18-
"lint:style:fix": "yarn lint:style --fix",
19-
"test:affected": "nx affected --target=test --parallel=5",
2012
"build:affected": "nx affected --target=build --parallel=5",
21-
"build:vscode-extension": "nx build vscode-extension && cd dist/packages/vscode-extension && vsce package",
2213
"build:executors": "tsc --project tools/tsconfig.json",
2314
"build:icons": "node ./tools/ui-icons.js",
24-
"build:helper": "node ./tools/ui-helper.js",
25-
"prepublish:vscode-extension": "yarn build:vscode-extension",
26-
"publish:vscode-extension": "cd dist/packages/vscode-extension && vsce publish",
15+
"build:vscode-extension": "nx build vscode-extension && cd dist/packages/vscode-extension && yarn install -W && vsce package --yarn",
2716
"check-update": "yarn upgrade-interactive --latest",
17+
"lint:affected": "nx affected --target=lint --parallel=5",
18+
"lint:style": "stylelint **/*.{css,scss,html,md}",
19+
"lint:style:fix": "yarn lint:style --fix",
2820
"prepare": "husky install && chmod ug+x .husky/*",
2921
"prepublishOnly": "nx run-many --all --target=build --parallel=5 --exclude=site,vscode-extension",
30-
"version": "npx prettier lerna.json --write"
22+
"prepublish:vscode-extension": "yarn build:vscode-extension",
23+
"publish:vscode-extension": "cd dist/packages/vscode-extension && vsce publish --yarn",
24+
"site:serve": "nx serve site",
25+
"sort-package-json": "npx sort-package-json 'package.json' 'packages/*/package.json'",
26+
"test:affected": "nx affected --target=test --parallel=5",
27+
"version": "npx prettier lerna.json --write",
28+
"watch:vscode-extension": "nx build vscode-extension --watch"
3129
},
3230
"dependencies": {
3331
"@ant-design/icons-svg": "^4.2.1",
34-
"@stackblitz/sdk": "^1.8.0",
35-
"codesandbox": "^2.2.3",
36-
"core-js": "^3.24.1",
37-
"dayjs": "^1.11.5",
38-
"highlight.js": "^11.6.0",
39-
"i18next": "^21.9.0",
40-
"immer": "^9.0.15",
41-
"lodash": "^4.17.21",
42-
"marked": "^4.0.18",
43-
"react": "^18.2.0",
44-
"react-dom": "^18.2.0",
45-
"react-i18next": "^11.18.3",
46-
"react-router-dom": "^6.3.0",
47-
"regenerator-runtime": "^0.13.9",
48-
"rfs": "^9.0.6",
49-
"rxjs": "^7.5.6",
50-
"swiper": "^8.3.2",
51-
"tslib": "^2.4.0"
52-
},
53-
"devDependencies": {
5432
"@commitlint/cli": "^17.0.3",
5533
"@commitlint/config-conventional": "^17.0.3",
5634
"@nrwl/cli": "14.5.6",
@@ -62,6 +40,7 @@
6240
"@nrwl/tao": "14.5.6",
6341
"@nrwl/web": "14.5.6",
6442
"@nrwl/workspace": "14.5.6",
43+
"@stackblitz/sdk": "^1.8.0",
6544
"@testing-library/react": "^13.3.0",
6645
"@types/fs-extra": "^9.0.13",
6746
"@types/glob": "^7.2.0",
@@ -77,6 +56,9 @@
7756
"@typescript-eslint/parser": "^5.33.0",
7857
"@vscode/test-electron": "^2.1.5",
7958
"babel-jest": "^27.5.1",
59+
"codesandbox": "^2.2.3",
60+
"core-js": "^3.24.1",
61+
"dayjs": "^1.11.5",
8062
"eslint": "^8.22.0",
8163
"eslint-config-prettier": "^8.5.0",
8264
"eslint-plugin-import": "^2.26.0",
@@ -89,15 +71,27 @@
8971
"eslint-plugin-tsdoc": "^0.2.16",
9072
"fs-extra": "^10.1.0",
9173
"glob": "^8.0.3",
74+
"highlight.js": "^11.6.0",
9275
"husky": "^8.0.1",
76+
"i18next": "^21.9.0",
77+
"immer": "^9.0.15",
9378
"jest": "^27.5.1",
9479
"lerna": "^5.4.2",
80+
"lodash": "^4.17.21",
81+
"marked": "^4.0.18",
9582
"mocha": "^10.0.0",
9683
"nx": "14.5.6",
9784
"postcss-html": "^1.5.0",
9885
"postcss-markdown": "^1.2.0",
9986
"prettier": "^2.7.1",
87+
"react": "^18.2.0",
88+
"react-dom": "^18.2.0",
89+
"react-i18next": "^11.18.3",
90+
"react-router-dom": "^6.3.0",
10091
"react-test-renderer": "^18.2.0",
92+
"regenerator-runtime": "^0.13.9",
93+
"rfs": "^9.0.6",
94+
"rxjs": "^7.5.6",
10195
"rxjs-for-await": "^1.0.0",
10296
"sass": "^1.54.4",
10397
"stylelint": "^14.10.0",
@@ -106,12 +100,16 @@
106100
"stylelint-config-recommended-scss": "^7.0.0",
107101
"stylelint-config-standard": "^27.0.0",
108102
"stylelint-scss": "^4.3.0",
103+
"swiper": "^8.3.2",
109104
"ts-jest": "^27.1.4",
110105
"ts-node": "^10.9.1",
106+
"tslib": "^2.4.0",
111107
"typescript": "~4.7.4",
112108
"yaml-front-matter": "^4.1.1"
113109
},
114-
"workspaces": [
115-
"packages/*"
116-
]
110+
"engines": {
111+
"node": "14.x || 16.x",
112+
"npm": "Please use yarn instead of NPM to install dependencies",
113+
"yarn": ">=1.22.4 <2"
114+
}
117115
}

packages/hooks/package.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "@react-devui/hooks",
33
"version": "0.1.0-alpha.9",
4-
"author": "Xie Jay <xiejay97@gmail.com>",
54
"description": "DevUI hooks based on React",
6-
"title": "DevUI",
75
"keywords": [
86
"ui",
97
"devui",
@@ -12,18 +10,28 @@
1210
"react",
1311
"react-hook"
1412
],
15-
"repository": {
16-
"type": "git",
17-
"url": "https://github.com/DevCloudFE/react-devui.git"
18-
},
1913
"homepage": "https://github.com/DevCloudFE/react-devui/tree/main/packages/hooks#readme",
2014
"bugs": {
2115
"url": "https://github.com/DevCloudFE/react-devui/issues"
2216
},
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/DevCloudFE/react-devui.git"
20+
},
2321
"license": "MIT",
22+
"author": "Xie Jay <xiejay97@gmail.com>",
2423
"sideEffects": false,
24+
"dependencies": {
25+
"@react-devui/utils": "file:../utils",
26+
"immer": "^9.0.15",
27+
"lodash": "^4.17.21",
28+
"react": "^18.2.0",
29+
"react-dom": "^18.2.0",
30+
"rxjs": "^7.5.6"
31+
},
2532
"publishConfig": {
2633
"access": "public",
2734
"directory": "../../dist/packages/hooks"
28-
}
35+
},
36+
"title": "DevUI"
2937
}

packages/hooks/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"outputPath": "dist/packages/hooks",
1212
"tsConfig": "packages/hooks/tsconfig.lib.json",
1313
"main": "packages/hooks/index.ts",
14-
"buildableProjectDepsInPackageJsonType": "dependencies",
14+
"updateBuildableProjectDepsInPackageJson": false,
1515
"assets": [
1616
{
1717
"glob": "CHANGELOG.md",

0 commit comments

Comments
 (0)