diff --git a/.travis.yml b/.travis.yml index 93c893449d..1afb9e3664 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,19 +13,19 @@ matrix: language: node_js node_js: "8" + - os: windows + language: node_js + node_js: "8" + + before_install: - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install libdbus-1-dev -y; fi script: - - npm test - - npm run build:dist + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then npm test && npm run build:dist && npm run build:electron:linux && npm run build:linux; fi + - if [ "$TRAVIS_OS_NAME" == "windows" ]; then npm test && npm run build:dist:windows && npm run build:electron && npm run build:windows; fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then npm test && npm run build:dist && npm run build:electron && npm run build:macos; fi - - | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - npm run build:electron:linux && npm run build:linux - else - npm run build:electron && npm run build:macos - fi cache: directories: diff --git a/package.json b/package.json index c105f774d1..3b586d32e0 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "electron:docker": "docker run --rm --net=host --env=\"DISPLAY\" --volume=\"$HOME/.Xauthority:/root/.Xauthority:rw\" --device /dev/snd nuclear", "watch": "webpack-dev-server --inline --progress --env=dev", "build:dist": "webpack --progress --colors --env=prod && cp loader.css dist", + "build:dist:windows": "webpack --progress --colors --env=prod && copy loader.css dist", "build:electron:linux": "webpack --progress --colors --env.LINUX=true --config=webpack.config.electron.prod.js", "build:electron": "webpack --progress --colors --config=webpack.config.electron.prod.js", "build:docker": "docker build -t nuclear .", diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 5ed9bbcd09..1f932cccf8 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -8,6 +8,7 @@ const APP_DIR = path.resolve(__dirname, 'app'); const RESOURCES_DIR = path.resolve(__dirname, 'resources'); const config = { + entry: [ 'react-hot-loader/patch', 'webpack-dev-server/client?http://localhost:8080', @@ -25,7 +26,7 @@ const config = { publicPath: '/' }, mode: 'development', - devtool: 'source-map', + devtool: process.env.NODE_ENV === "development" ? "source-map" : "none", optimization: { namedModules: true }, @@ -82,6 +83,7 @@ const config = { }) ], target: 'electron-renderer' + }; module.exports = config; diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 25ab19ef3d..8aca16ccf3 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -17,7 +17,7 @@ const config = { fs: "empty" }, mode: 'production', - devtool: 'source-map', + devtool: process.env.NODE_ENV === "development" ? "source-map" : "none", optimization: { namedModules: true, splitChunks: {