Skip to content

Commit c8ab71e

Browse files
authored
chore(project): add SVGO script (netless-io#1289)
1 parent df70867 commit c8ab71e

File tree

18 files changed

+190
-119
lines changed

18 files changed

+190
-119
lines changed

.github/workflows/check-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install NodeJS
5454
uses: actions/setup-node@v2
5555
with:
56-
node-version: "15.10.0"
56+
node-version: "16"
5757

5858
- name: Install changed package dependencies and build packages
5959
run: |-

.github/workflows/check-spell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install NodeJS
1717
uses: actions/setup-node@v2
1818
with:
19-
node-version: "15.10.0"
19+
node-version: "16"
2020

2121
- name: Install cspell
2222
run: yarn global add cspell

.github/workflows/deploy-storybook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install NodeJS
1818
uses: actions/setup-node@v2
1919
with:
20-
node-version: "12.18.2"
20+
node-version: "16"
2121

2222
- uses: actions/cache@v2
2323
id: yarn-cache

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.svg": "svgo"
3+
}

cspell.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ module.exports = {
9595
"geogebra", // @netless/app-geogebra
9696
"commitlintrc", // @commitlint/cli
9797
"unpublish", // agora-rtc-sdk-ng
98+
"multipass", // svgo
9899

99100
// misc
100101
"npmrc",
@@ -116,6 +117,7 @@ module.exports = {
116117
"Frameless",
117118
"micromessenger",
118119
"bokeh",
120+
"lintstagedrc",
119121

120122
// CNCF
121123
"nindent",

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"postinstall": "husky install",
66
"bootstrap": "yarn run _init:agora-configure && yarn install --frozen-lockfile --force",
7-
"lint": "yarn workspaces run lint",
7+
"lint": "lint-staged && yarn workspaces run lint",
88
"check-spelling": "cspell --no-progress \"**/*.{md,ts,tsx,js,css,less,json,yml,yaml,html,sh}\"",
99
"storybook": "yarn workspace flat-components start",
1010
"start": "node scripts/launch/index.js",
@@ -31,6 +31,8 @@
3131
"cspell": "^5.6.6",
3232
"dotenv-flow": "^3.2.0",
3333
"husky": "^5.0.9",
34-
"rimraf": "^3.0.2"
34+
"lint-staged": "^12.1.7",
35+
"rimraf": "^3.0.2",
36+
"svgo": "^2.8.0"
3537
}
3638
}
Lines changed: 1 addition & 6 deletions
Loading
Lines changed: 1 addition & 6 deletions
Loading
Lines changed: 1 addition & 6 deletions
Loading
Lines changed: 1 addition & 8 deletions
Loading

0 commit comments

Comments
 (0)