-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.54 KB
/
Makefile
File metadata and controls
54 lines (40 loc) · 1.54 KB
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
PATH :=./node_modules/.bin/:$(HOME)/.npm-packages/bin/:$(PATH)
BROWSERIFY:= $(shell cat .browserify | sed 's/.*/-r & /g')
# $(for package in $(cat .browserify); do echo -n " -r $package"; done)
all: install build test start
clean:
rm -rf lib/*
rm -rf assets/scripts/app/*
init:
if [ -e npm-shrinkwrap.json ]; then rm npm-shrinkwrap.json; fi
mkdir -p assets/scripts/app/
mkdir -p scripts
touch .browserify
npm install
browserify:
mkdir -p assets/scripts/app/
browserify $(BROWSERIFY) > assets/scripts/app/browserified.js
build: clean init # browserify
./node_modules/.bin/coffee -cm -o lib src
./node_modules/.bin/coffee -cm -o assets/scripts/app/ scripts/
./node_modules/.bin/stylus -o assets/styles/app styles/ &
watch: end-watch
./node_modules/.bin/coffee -cmw -o lib src & echo $$! > .watch_pid
./node_modules/.bin/coffee -cmw -o assets/scripts/app/ scripts/ & echo $$! > .watch_frontend_pid
./node_modules/.bin/stylus -w -o assets/styles/app styles/ &
end-watch:
if [ -e .watch_pid ]; then kill `cat .watch_pid`; rm .watch_pid; else echo no .watch_pid file; fi
if [ -e .watch_frontend_pid ]; then kill `cat .watch_frontend_pid`; rm .watch_frontend_pid; else echo no .watch_pid file; fi
dev: watch
NODE_ENV=development DEBUG=microserver,microserver:* nodemon lib/app.js
start:
npm start
forever: build
forever start lib/app.js
test:
npm test
docs:
echo "Error: no docs generator installed"
# ./node_modules/.bin/groc "src/*.coffee?(.md)" "src/**/*.coffee?(.md)" readme.md
clean-docs:
rm -rf docs/*