forked from bem-archive/bem-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
52 lines (42 loc) · 1.77 KB
/
GNUmakefile
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
BIN = ./node_modules/.bin
BEM = $(BIN)/bem
MOCHA = $(BIN)/mocha
ISTANBUL = $(BIN)/istanbul
.PHONY: all
all:
.PHONY: clean
clean: clean-coverage
-rm -rf test-make-temp
.PHONY: clean-coverage
clean-coverage:
-rm -rf lib-cov
-rm -rf html-report
.PHONY: test
test:
$(MOCHA)
.PHONY: lib-cov
lib-cov: clean-coverage
$(ISTANBUL) instrument --output lib-cov --no-compact --variable global.__coverage__ lib
.PHONY: coverage
coverage: lib-cov
BEM_COVER=1 $(MOCHA) --reporter mocha-istanbul
@echo
@echo Open html-report/index.html file in your browser
.PHONY: tests
tests:
-rm -rf tests/level4
$(BEM) create level -o tests -l simple -T css -T js -t xsl level4
$(BEM) create block -l tests/level4 -T css -T js -t xsl first-block
$(BEM) create elem -l tests/level4 -b first-block -T css -T js -t xsl elem1
$(BEM) create mod -l tests/level4 -b first-block mod1
$(BEM) create mod -l tests/level4 -b first-block -v 1 mod1
-rm -rf tests/level5
$(BEM) create level -o tests -l tests/level2/.bem/level.js -t css -t css1 -n js -n js1 level5
$(BEM) create block -l tests/level5 first-block
$(BEM) create elem -l tests/level5 -b second-block -n css1 elem2
$(BEM) create mod -l tests/level5 -b second-block mod2
$(BEM) create mod -l tests/level5 -b second-block -e elem2 -v 221 -v 222 mod22
$(BEM) build -d tests/decl.js -o tests -n bla -t deps.js -t ie.css -l tests/level1 -l tests/level2 -l tests/level3 -l tests/level4 -l tests/level5
$(BEM) build -d tests/bla.deps.js -o tests -n bla -t css -t js -l tests/level1 -l tests/level2 -l tests/level3 -l tests/level4 -l tests/level5
$(BEM) decl subtract -o tests/deps-subtract.deps.js -d tests/deps-subtract-1.deps.js -d tests/deps-subtract-2.deps.js
$(BEM) decl merge -o tests/deps-merge.deps.js -d tests/deps-merge-1.deps.js -d tests/deps-merge-2.deps.js