Fix travis build
This commit is contained in:
parent
c7ca716802
commit
f70f2977ab
3 changed files with 9 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
"build": "webpack --bail --config webpack.dev.js --env",
|
"build": "webpack --bail --config webpack.dev.js --env",
|
||||||
"production-build": "webpack --bail --config webpack.prod.js --env",
|
"production-build": "webpack --bail --config webpack.prod.js --env",
|
||||||
"watch": "webpack-dev-server --open --config webpack.dev.js --env",
|
"watch": "webpack-dev-server --open --config webpack.dev.js --env",
|
||||||
"travis": "yarn lint && yarn build && yarn production-build",
|
"travis": "./travis.sh",
|
||||||
"lint": "eslint -- --ext js --ext jsx src/",
|
"lint": "eslint -- --ext js --ext jsx src/",
|
||||||
"precommit": "yarn lint"
|
"precommit": "yarn lint"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
7
travis.sh
Executable file
7
travis.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
yarn lint && for conf in $(ls config/); do
|
||||||
|
if [ $conf == "utils.js" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
yarn build $conf && yarn production-build $conf
|
||||||
|
done || exit 1
|
||||||
|
|
@ -25,7 +25,7 @@ const configPath = env => {
|
||||||
module.exports = env => merge(common, {
|
module.exports = env => merge(common, {
|
||||||
entry: {
|
entry: {
|
||||||
main: [configPath(env),
|
main: [configPath(env),
|
||||||
path.resolve(__dirname, 'src/index.jsx')]
|
path.resolve(__dirname, 'src/index.jsx')],
|
||||||
vendor: ['react', 'material-ui', 'mqtt', 'lodash']
|
vendor: ['react', 'material-ui', 'mqtt', 'lodash']
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue