Skip to content

Commit 59721ea

Browse files
committed
chore: ⬆️ Add more tools
* Move husky to .huskyrc * Add browserslistrc * babel plugin transform runtime
1 parent 7cc35d5 commit 59721ea

File tree

5 files changed

+53
-14
lines changed

5 files changed

+53
-14
lines changed

.babelrc

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"presets": [
3-
["@babel/preset-env"],
3+
["@babel/preset-env", {
4+
"debug": true,
5+
"modules": false
6+
}],
47
["@babel/preset-react"],
58
["@babel/preset-typescript"]
69
],
710
"plugins": [
11+
["@babel/plugin-transform-runtime"],
812
["@babel/plugin-proposal-object-rest-spread"],
913
["@babel/plugin-proposal-class-properties"]
1014
]

.browserslistrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 20
4+
not ie_mob <= 100
5+
not ff <= 100
6+
not and_ff <= 100
7+
not Edge <= 100
8+
Android >= 5.0

.huskyrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "lint-staged",
4+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
5+
}
6+
}

package-lock.json

+31-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-7
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"doc:dev": "webpack-dev-server --config scripts/webpack.doc.js",
1010
"example": "webpack-dev-server --config scripts/webpack.example.js",
1111
"lint": "tslint -c tslint.json -t codeFrame 'src/**/*.tsx' 'src/**/*.ts' 'site/**/*.ts' 'site/**/*.tsx' 'example/**/*.tsx', 'example/**/*.ts'",
12-
"type-check": "tsc",
13-
"precommit": "lint-staged"
12+
"type-check": "tsc"
1413
},
1514
"repository": {
1615
"type": "git",
@@ -28,6 +27,7 @@
2827
"@babel/core": "^7.1.6",
2928
"@babel/plugin-proposal-class-properties": "^7.3.4",
3029
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
30+
"@babel/plugin-transform-runtime": "^7.3.4",
3131
"@babel/preset-env": "^7.1.6",
3232
"@babel/preset-react": "^7.0.0",
3333
"@babel/preset-typescript": "^7.3.3",
@@ -83,16 +83,12 @@
8383
"webpack-dev-server": "^3.2.1",
8484
"yaml-frontmatter-loader": "^0.1.0"
8585
},
86-
"husky": {
87-
"hooks": {
88-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
89-
}
90-
},
9186
"peerDependencies": {
9287
"react": "^16.6.3",
9388
"react-dom": "^16.6.3"
9489
},
9590
"dependencies": {
91+
"@babel/runtime": "^7.3.4",
9692
"classnames": "^2.2.6"
9793
}
9894
}

0 commit comments

Comments
 (0)