Merge pull request #2 from dod-ccpo/watch_for_changes

Add option to watch for changes to css
This commit is contained in:
briandds 2018-05-23 12:59:31 -04:00 committed by GitHub
commit d696540371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View File

@ -13,8 +13,14 @@
## Running (development)
To start the app and watch for changes:
DEBUG=1 ./app.py
To rebuild css whenever the scss changes:
./gen-css --watch
## Notes
tornado templates are like mustache templates -- add the

13
gen-css
View File

@ -1,5 +1,14 @@
#!/bin/sh -x
#!/bin/sh
opts=$1
cp -a node_modules/uswds/dist/fonts static/
sass scss/atat.scss > static/assets/atat.css
if [ "$opts" == "--watch" ]; then
set -x
sass --watch scss/atat.scss:static/assets/atat.css
else
set -x
sass scss/atat.scss > static/assets/atat.css
fi