-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (45 loc) · 1.24 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# If you change something here, be sure to reflect the changes in:
# - the scripts section of the package.json file
# - the .travis.yml file
# -----------------
# Variables
BIN=node_modules/.bin/
COFFEE=$(BIN)coffee
OUT=out
SRC=src
# -----------------
# Documentation
# Usage: coffee [options] path/to/script.coffee -- [args]
# -b, --bare compile without a top-level function wrapper
# -c, --compile compile to JavaScript and save as .js files
# -o, --output set the output directory for compiled JavaScript
# -w, --watch watch scripts for changes and rerun commands
# -----------------
# Commands
# Watch and recompile our files
dev:
$(COFFEE) -cbwo $(OUT) $(SRC)
# Compile our files
compile:
$(COFFEE) -cbo $(OUT) $(SRC)
# Clean up
clean:
rm -Rf $(OUT) node_modules *.log
# Install dependencies
install:
npm install
# Reset
reset:
make clean
make install
make compile
# Ensure everything is ready for our tests (used by things like travis)
test-prepare:
make reset
rm -Rf test/node_modules test/*out test/*.log
cd test; npm install
# Run our tests
test:
npm test
# Ensure the listed commands always re-run and are never cached
.PHONY: dev compile clean install reset test-prepare test