watch.sh 482 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # Configuration
  4. #
  5. # sass source
  6. SASS_SOURCE_PATH="scss"
  7. # sass options
  8. SASS_OPTIONS="--source-map=true --style=nested"
  9. # css target
  10. CSS_TARGET_PATH="css"
  11. #
  12. # Check prerequisites
  13. #
  14. wtfile=$(command -v wt) || { echo "install wellington with 'brew install wellington"; exit 1; }
  15. #
  16. # Watch folder for changes
  17. #
  18. cd -P `pwd`
  19. $wtfile compile "$SASS_SOURCE_PATH" -b "$CSS_TARGET_PATH" $SASS_OPTIONS
  20. $wtfile watch "$SASS_SOURCE_PATH" -b "$CSS_TARGET_PATH" $SASS_OPTIONS