-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
39 lines (30 loc) · 841 Bytes
/
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
# folders
SRC = ./src
TEST = ./test
BUILD = ./build
BIN = $(NODEMOD)/.bin
NODEMOD = ./node_modules
TRANSFORMS = $(SRC)/transforms
# files
MAIN = $(SRC)/index.js
MAPFILE = subsequence-search.min.map
all: jshint test $(BUILD)/subsequence-search.min.js
force: $(BUILD)/subsequence-search.min.js
jshint:
$(BIN)/jshint $(SRC)/*.js
test:
$(BIN)/mocha -r should -u bdd -b $(TEST)/*
$(BUILD)/subsequence-search.min.js: $(BUILD)/subsequence-search.js
$(BIN)/uglifyjs $^ \
-o $@ \
-c -m \
--source-map $(BUILD)/$(MAPFILE) \
--source-map-root ../../ \
--source-map-url ./$(MAPFILE) \
--comments \
--stats
$(BUILD)/subsequence-search.js: $(SRC)/* $(NODEMOD)/auto-curry/index.js
$(BIN)/browserify -s subsequenceSearch -e $(MAIN) -o $@
clean:
rm -f $(BUILD)/*
.PHONY: all jshint test clean