forked from artsy/ezel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.53 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
#
# Make -- the OG build tool.
# Add any build tasks here and abstract complex build scripts into `lib` that
# can be run in a Makefile task like `coffee lib/build_script`.
#
# Remember to set your text editor to use 4 size non-soft tabs.
#
BIN = node_modules/.bin
# Start the server
s:
node index.js
# Run all of the project-level tests, followed by app-level tests
test: assets
$(BIN)/mocha $(shell find test -name '*.js' -not -path 'test/helpers/*')
$(BIN)/mocha $(shell find apps/*/test -name '*.js' -not -path 'test/helpers/*')
# Generate minified assets from the /assets folder and output it to /public.
assets:
$(foreach file, $(shell find assets -name '*.js' | cut -d '.' -f 1), \
$(BIN)/browserify $(file).js -t jadeify2 > public/$(file).js; \
$(BIN)/uglifyjs public/$(file).js > public/$(file).min.js \
)
$(BIN)/stylus assets -o public/assets
$(foreach file, $(shell find assets -name '*.styl' | cut -d '.' -f 1), \
$(BIN)/sqwish public/$(file).css -o public/$(file).min.css \
)
# Cleans up the initial GitHub app example files. After running this you might
# want to change the API_URL in config, mount your own app in lib/setup,
# set up your own fake API in test/helpers/integration, and delete this task.
clean:
rm -rf apps/commits/
rm collections/commits.js
rm models/commit.js
rm -rf public/assets/commits.js
rm -rf public/assets/commits.css
rm -rf public/assets/commits.min.js
rm -rf public/assets/commits.min.css
rm assets/commits.js
rm assets/commits.styl
rm test/models/commit.js
rm LICENSE.md
.PHONY: test assets