forked from docpad/docpad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·59 lines (43 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
# 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
# -----------------
# 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 npm-debug.log
# Install
install:
npm install
# Reset
reset:
make clean
make install
# Ensure everything is ready for our tests (used by things like travis)
test-prepare:
rm -Rf test/node_modules test/out test/npm-debug.log
make install
make compile
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