2016-03-15 17:05:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-08-17 21:15:09 +02:00
|
|
|
set -euo pipefail
|
|
|
|
#set -x
|
2016-03-15 17:05:11 +01:00
|
|
|
|
2016-08-17 21:15:09 +02:00
|
|
|
#trap 'kill $(jobs -p)' EXIT # IS THIS NECESSARY? on linux, it kills all child processes when you ctrl-c
|
2016-03-15 17:12:43 +01:00
|
|
|
|
2016-08-17 21:15:09 +02:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
2017-06-05 18:29:17 +02:00
|
|
|
(
|
|
|
|
cd "$DIR"
|
|
|
|
mkdir -p $DIR/dist/css
|
|
|
|
mkdir -p $DIR/dist/js
|
2016-08-17 21:15:09 +02:00
|
|
|
|
2017-06-05 18:29:17 +02:00
|
|
|
if [ ! -d "$DIR/node_modules" ]; then
|
|
|
|
echo "Installing NPM modules"
|
2017-06-23 21:18:03 +02:00
|
|
|
yarn install
|
2017-06-05 18:29:17 +02:00
|
|
|
fi
|
2016-08-17 21:15:09 +02:00
|
|
|
|
2017-06-05 18:29:17 +02:00
|
|
|
# run sass once without --watch to force update. then run with --watch to keep watching
|
2017-11-29 01:29:59 +01:00
|
|
|
node_modules/.bin/node-sass --output $DIR/dist/css --sourcemap=none $DIR/src/renderer/scss/
|
|
|
|
node_modules/.bin/node-sass --output $DIR/dist/css --sourcemap=none --watch $DIR/src/renderer/scss/ &
|
2016-08-17 22:27:53 +02:00
|
|
|
|
2017-11-29 01:29:59 +01:00
|
|
|
node_modules/.bin/webpack --config $DIR/src/renderer/webpack.dev.js --progress --colors --watch
|
|
|
|
)
|