-
Notifications
You must be signed in to change notification settings - Fork 8
/
develop.sh
executable file
·38 lines (30 loc) · 1.23 KB
/
develop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# Run this script after installing the release version of the userscript
#
# Requires:
# - npm install -g coffee-script coffeelint coffee-jshint docco
#
# TODO: Look into rewriting this as a Cakefile so I can use:
# - The same output colorization mechanism as CoffeeLint
# - A simpler option than shell for watching all installed copies of the script
# Make sure our relative paths are OK
cd "`dirname \"$0\"`"
printf "Running CoffeeScript compiler to watch for changes and update in-browser Javascript\n"
printf "Press Enter to exit and rebuild repository copy\n\n"
for X in ~/.mozilla/firefox/*/gm_scripts/IsThereAnyDeal.com_Collection_Importer/; do
coffee -cwb -o "$X" itad_importer.user.coffee &
# Reinvent Ctrl+C using Enter to work around npm flaw
PID=$!
read _
kill $PID
break # Trick to just get the first match
done
printf "\n\nRunning CoffeeLint...\n"
coffeelint itad_importer.user.coffee
printf "Running JSHint...\n"
coffee-jshint -o loopfunc,newcap,noarg,nonew,browser,devel,jquery itad_importer.user.coffee
printf "\nRunning CoffeeScript Compiler for Repository Build...\n"
coffee -cb itad_importer.user.coffee
printf "\nRunning docco to rebuild code documentation...\n"
docco itad_importer.user.coffee