Add prettier, husky
This commit is contained in:
Родитель
c35279abc9
Коммит
9b121ab121
|
@ -1,13 +1,25 @@
|
|||
const path = require('path');
|
||||
const path = require("path");
|
||||
const { injectBabelPlugin } = require("react-app-rewired");
|
||||
const rewireLess = require("react-app-rewire-less");
|
||||
|
||||
module.exports = function (config, env) {
|
||||
module.exports = function(config, env) {
|
||||
config.resolve = {
|
||||
...config.resolve,
|
||||
alias: {
|
||||
...config.resolve.alias,
|
||||
normandy: path.resolve(__dirname, './src/normandy/')
|
||||
normandy: path.resolve(__dirname, "./src/normandy/")
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// LESS support
|
||||
config = rewireLess(config, env);
|
||||
// Legacy decorator support
|
||||
config = injectBabelPlugin("transform-decorators-legacy", config);
|
||||
// Use Ant LESS imports
|
||||
config = injectBabelPlugin(
|
||||
["import", { libraryName: "antd", style: true }],
|
||||
config
|
||||
);
|
||||
|
||||
return config;
|
||||
}
|
||||
};
|
||||
|
|
26
package.json
26
package.json
|
@ -3,17 +3,39 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"antd": "^3.2.1",
|
||||
"autobind-decorator": "^2.1.0",
|
||||
"immutable": "^3.8.2",
|
||||
"js-cookie": "^2.2.0",
|
||||
"localforage": "^1.5.6",
|
||||
"react": "^16.2.0",
|
||||
"react-copy-to-clipboard": "^5.0.1",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-scripts": "1.1.1"
|
||||
"react-redux": "^5.0.7",
|
||||
"react-scripts": "1.1.1",
|
||||
"redux": "^3.7.2",
|
||||
"redux-little-router": "^15.0.0",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-thunk": "^2.2.0",
|
||||
"underscore": "^1.8.3"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-app-rewired start",
|
||||
"build": "react-app-rewired build",
|
||||
"test": "react-app-rewired test --env=jsdom",
|
||||
"eject": "react-scripts eject"
|
||||
"eject": "react-scripts eject",
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,json,css,md}": ["prettier --write", "git add"]
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-import": "^1.6.5",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"husky": "^0.14.3",
|
||||
"lint-staged": "^7.0.0",
|
||||
"prettier": "^1.10.2",
|
||||
"react-app-rewire-less": "^2.1.0",
|
||||
"react-app-rewired": "^1.4.1"
|
||||
}
|
||||
}
|
||||
|
|
2036
yarn.lock
2036
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче