lbry-desktop/ui/watch.sh
btzr-io 8d1c3531b7 update build
all.scss > themes/light.css
2017-08-06 20:23:52 -06:00

26 lines
755 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
#set -x
#trap 'kill $(jobs -p)' EXIT # IS THIS NECESSARY? on linux, it kills all child processes when you ctrl-c
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
(
cd "$DIR"
mkdir -p $DIR/dist/css
mkdir -p $DIR/dist/js
if [ ! -d "$DIR/node_modules" ]; then
echo "Installing NPM modules"
yarn install
fi
# run sass once without --watch to force update. then run with --watch to keep watching
node_modules/.bin/node-sass --sourcemap=none $DIR/scss/all.scss $DIR/../app/dist/themes/light.css
node_modules/.bin/node-sass --sourcemap=none --watch $DIR/scss/all.scss $DIR/../app/dist/themes/light.css &
node_modules/.bin/webpack --config webpack.dev.config.js --progress --colors --watch
)