-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
48 lines (38 loc) · 1.84 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
#===================================================================
#--------------------------- VARIABLES -----------------------------
#===================================================================
requirejsBuild = src/r.js
#===================================================================
#--------------------------- TARGETS ------------------------------
#===================================================================
.PHONY : all
all: specs
#-------------------------------------------------------------------
# BUILD
#-------------------------------------------------------------------
#-------------------------------------------------------------------
# Dependencies
#-------------------------------------------------------------------
deps:
npm install
lodash:
node_modules/.bin/lodash backbone -o support/lodash.custom.js
rm ./lodash.*js
#-------------------------------------------------------------------
# TEST
#-------------------------------------------------------------------
# Build test/fixtures/defineView-builder-plugin/
# - Tests cell can be properly used by requirejs optimizer build script
spec-defineView-builder-plugin:
script/compile-specs
node $(requirejsBuild) -o specs/fixtures/defineView-builder-plugin/build.js
node $(requirejsBuild) -o specs/fixtures/defineView-builder-plugin/build-outcss-filename.js
cd specs/fixtures/defineView-builder-plugin; node node_build.js
define MAKE_ALL_TESTS_COFFEE
specs = process.argv[4..].map (e)-> "spec!#{/(.*?\.spec)\.js/.exec(e)[1]}"
console.log "define(#{JSON.stringify specs},function(){return Array.prototype.slice.call(arguments)});"
endef
export MAKE_ALL_TESTS_COFFEE
specs: deps spec-defineView-builder-plugin
script/compile-specs
cd specs/; find . -name "*.spec.js" -type f | xargs ../node_modules/.bin/coffee -e "$$MAKE_ALL_TESTS_COFFEE" > GENERATED_all-specs.js