Skip to content

Commit

Permalink
Windows build (#380)
Browse files Browse the repository at this point in the history
* made changes for travis to run buil on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* made changes for travis to run build on windows

* changes in package.json

* changes in package.json

* changes in package.json

* Applying a workaround using
electron-userland/electron-webpack-quick-start#14

* Changing webpack version to 4.x, with reference to
webpack/webpack-sources#28
  • Loading branch information
tusharchitti authored and nukeop committed Jul 5, 2019
1 parent 93f829b commit 4a291d5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -25,7 +26,7 @@ const config = {
publicPath: '/'
},
mode: 'development',
devtool: 'source-map',
devtool: process.env.NODE_ENV === "development" ? "source-map" : "none",
optimization: {
namedModules: true
},
Expand Down Expand Up @@ -82,6 +83,7 @@ const config = {
})
],
target: 'electron-renderer'

};

module.exports = config;
2 changes: 1 addition & 1 deletion webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 4a291d5

Please sign in to comment.