diff --git a/package.json b/package.json index 992b444..8dae7a1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "webpack --bail --config webpack.dev.js --env", "production-build": "webpack --bail --config webpack.prod.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/", "precommit": "yarn lint" }, diff --git a/travis.sh b/travis.sh new file mode 100755 index 0000000..b8bfe9d --- /dev/null +++ b/travis.sh @@ -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 diff --git a/webpack.prod.js b/webpack.prod.js index e0f5155..fa01ede 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -25,7 +25,7 @@ const configPath = env => { module.exports = env => merge(common, { entry: { main: [configPath(env), - path.resolve(__dirname, 'src/index.jsx')] + path.resolve(__dirname, 'src/index.jsx')], vendor: ['react', 'material-ui', 'mqtt', 'lodash'] }, module: {