Skip to content

Commit 46bfaa5

Browse files
committed
extract configure to external
1 parent 7f39a67 commit 46bfaa5

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

.huskyrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "npm test",
4+
"pre-push": "npm run build"
5+
}
6+
}

.lintstagedrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"*.{html,md,css,less,json,yml,js,ts,tsx}": [
3+
"prettier --write"
4+
]
5+
}

.postcssrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"modules": true,
3+
"plugins": {
4+
"autoprefixer": {
5+
"grid": true
6+
}
7+
}
8+
}

.prettierrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2+
"arrowParens": "avoid",
3+
"singleQuote": true,
24
"trailingComma": "all"
35
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
"editor.formatOnSave": true,
33
"editor.codeActionsOnSave": {
44
"source.fixAll": true
5+
},
6+
"files.associations": {
7+
".huskyrc": "json",
8+
".lintstagedrc": "json",
9+
".postcssrc": "json"
510
}
611
}

package.json

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,12 @@
99
"author": "JSCIG",
1010
"main": "source/index.html",
1111
"scripts": {
12-
"build": "rm -rf dist/ && npm run pack-dist && npm run pack-sw",
12+
"build": "rm -rf dist && npm run pack-dist && npm run pack-sw",
1313
"pack-dist": "parcel build source/index.html --public-url .",
14-
"pack-sw": "rm -f dist/sw.js.map && workbox generateSW",
15-
"start": "workbox generateSW && parcel source/index.html --open",
14+
"pack-sw": "rm -f dist/sw.js.map && workbox generateSW",
15+
"start": "workbox generateSW && parcel source/index.html --open",
1616
"test": "lint-staged"
1717
},
18-
"husky": {
19-
"hooks": {
20-
"pre-commit": "npm test",
21-
"pre-push": "npm run build"
22-
}
23-
},
24-
"lint-staged": {
25-
"*.{html,md,css,less,json,yml,js,ts,tsx}": [
26-
"prettier --write"
27-
]
28-
},
29-
"prettier": {
30-
"arrowParens": "avoid",
31-
"singleQuote": true,
32-
"trailingComma": "none"
33-
},
3418
"dependencies": {
3519
"boot-cell": "^1.1.1",
3620
"bootstrap-icons": "^1.0.0",
@@ -54,13 +38,5 @@
5438
"prettier": "^2.1.2",
5539
"typescript": "^4.0.3",
5640
"workbox-cli": "^4.3.1"
57-
},
58-
"postcss": {
59-
"modules": true,
60-
"plugins": {
61-
"autoprefixer": {
62-
"grid": true
63-
}
64-
}
6541
}
6642
}

0 commit comments

Comments
 (0)