forked from DanKottke/midas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (54 loc) · 2.18 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
62
63
64
#MOCHA_OPTS= --check-leaks --timeout 60000
MOCHA_OPTS= --timeout 60000
REPORTER = spec
DIR = .
build:
grunt build
check: test
copy-config:
-cp config/local.js config/local.js.bak
-cp config/settings/auth.js config/settings/auth.js.bak
-cp config/settings/sources.js config/settings/sources.js.bak
-cp config/settings/notifications.js config/settings/notifications.js.bak
-cp config/settings/emailTemplates.js config/settings/emailTemplates.js.bak
cp config/local.ex.js config/local.js
cp config/settings/auth.ex.js config/settings/auth.js
cp config/settings/sources.ex.js config/settings/sources.js
-cp config/settings/notifications.ex.js config/settings/notifications.js
-cp config/settings/emailTemplates.ex.js config/settings/emailTemplates.js
restore-config:
rm config/local.js
rm config/settings/auth.js
rm config/settings/sources.js
-mv config/local.js.bak config/local.js
-mv config/settings/auth.js.bak config/settings/auth.js
-mv config/settings/sources.js.bak config/settings/sources.js
-mv config/settings/notifications.js.bak config/settings/notifications.js
-mv config/settings/emailTemplates.js.bak config/settings/emailTemplates.js
import:
-cp $(DIR)/config/local.js config/
-cp $(DIR)/config/settings/*.js config/settings/
-cp $(DIR)/assets/js/backbone/config/*.js assets/js/backbone/config/
-cp $(DIR)/assets/js/backbone/config/*.json assets/js/backbone/config/
-cp $(DIR)/assets/styles/*.css assets/styles/
-cp -R $(DIR)/assets/images/* assets/images/
-cp $(DIR)/assets/js/backbone/apps/footer/templates/footer_template.html assets/js/backbone/apps/footer/templates/footer_template.html
-cp $(DIR)/test/init/init/config.js test/init/init/config.js
-cp $(DIR)/test/demo/data/config.js test/demo/data/config.js
-cp -R $(DIR)/test/demo/data/assets/* test/demo/data/assets
test: copy-config test-api restore-config
test-api:
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
$(MOCHA_OPTS) \
--recursive test/api
demo:
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
$(MOCHA_OPTS) \
--recursive test/demo
init:
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
$(MOCHA_OPTS) \
--recursive test/init