-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmake.cmd
81 lines (64 loc) · 1.58 KB
/
make.cmd
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@echo off
SET REPORTER=spec
SET MOCHA_OPTS=--check-leaks
SET BASE=.
SET ISTANBUL=node_modules\.bin\istanbul
SET JSHINT=node_modules\.bin\jshint
SET MOCHA=node_modules\.bin\mocha
SET _MOCHA=node_modules\mocha\bin\_mocha
if "%1"=="" goto :main else goto :eof
call:%~1
goto :eof
:main
call :clean
call :lint
call :killnode
call :test-unit
call :test-mocha
goto :eof
:cover
call :clean
call :killnode
cmd /c %ISTANBUL% cover "%_MOCHA%" test/mocha test/unittest -- --reporter %REPORTER% %MOCHA_OPTS%
goto :eof
:test-unit
SET NODE_ENV=test & %MOCHA% test\unittest --reporter %REPORTER% %MOCHA_OPTS%
goto :eof
:test-mocha
call :killnode
SET NODE_ENV=test & %MOCHA% test/mocha --reporter %REPORTER% %MOCHA_OPTS%
goto :eof
:account
call :killnode
start /WAIT /B node examples/account/index.js
start "" "http://localhost:8585/account/us/login"
goto :eof
:helloworld
call :killnode
start /WAIT /B node examples/helloworld/index.js
start "" "http://localhost:8686/helloworld/us/index"
goto :eof
:firststep
call :killnode
start /WAIT /B node examples/firststep/index.js
start "" "http://localhost:8787/firststep/index"
goto :eof
:components
call :killnode
call bower install indigojs-components
start /WAIT /B node examples/components/index.js
start "" "http://localhost:8888/uicomponents/index"
goto :eof
:debug
cls
SET DEBUG=indigo:* & nodemon --debug .
goto :eof
:killnode
taskkill /f /im node.exe
goto :eof
:lint
cmd /c %JSHINT% . --config %BASE%/.jshintrc
goto :eof
:clean
rmdir coverage /s /q
goto :eof