diff --git a/package.json b/package.json index 5e3aef76c..f76f1e96e 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,10 @@ "hot-server": "babel-node ./webpack/server.js", "dev": "concurrently --kill-others \"npm run hot-server\" \"npm run start-hot\"", "build": "bash scripts/build.sh", - "package": "npm run build && bash scripts/package.sh", + "package": "npm run package-win && npm run package-mac && npm run package-linux", + "package-mac": "node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --mac", + "package-win": "node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --win", + "package-linux": "node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --linux", "release": "npm run package && bash scripts/sentry-release.sh" }, "build": { @@ -84,6 +87,7 @@ "electron-builder": "^5.19.1", "electron-packager": "^7.3.0", "electron-prebuilt": "~1.2.8", + "elm": "^0.17.1", "elm-hot-loader": "^0.3.3", "elm-webpack-loader": "^3.0.3", "express": "latest", diff --git a/scripts/build.sh b/scripts/build.sh index e5fc2050b..dc76d28ae 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,6 +1,8 @@ #!/bin/bash #? Package the app +set -e + BUILD_DIR='./build' say "Starting build" @@ -8,7 +10,7 @@ echo "-- REMOVING DIST FOLDER --" rm -r "$BUILD_DIR" echo "-- BUILDING PRODUCTION APP --" -cross-env NODE_ENV=production node -r babel-register ./node_modules/.bin/webpack --config ./webpack/webpack.config.production.js +cross-env NODE_ENV=production node -r babel-register webpack --config ./webpack/webpack.config.production.js echo "-- COPYING REMAINING FILES --" diff --git a/scripts/package.sh b/scripts/package.sh deleted file mode 100644 index 0ad9b7a39..000000000 --- a/scripts/package.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -#? Package and generate installers - -echo "-- STARTING PACKAGING PROCESS... --" -say "Beginning platform packaging" -cp assets/* build/ - -echo "-- PACKAGING MAC --" -node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --mac -say "Mac packaging complete" - -echo "-- PACKAGING WINDOWS --" -node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --win -say "Windows packaging complete" - -echo "-- PACKAGING LINUX --" -node node_modules/electron-builder/out/build-cli.js --publish='never' --x64 --linux -say "Linux packaging complete" - -echo "-- PACKAGING COMPLETE --" -say "All platforms are now packaged"