-
Notifications
You must be signed in to change notification settings - Fork 51
/
Makefile
45 lines (36 loc) · 899 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
40
41
42
43
44
TESTS += test/filter.test.js
TESTS += test/minilog.test.js
DEFAULTS := \
--include ./lib/common \
--include ./node_modules/microee/ \
--global Minilog \
--main lib/web/index.js \
--out dist/minilog.js
# Note: you need uglifyjs, e.g: `npm install -g uglify-js@1.x` first
build:
@mkdir -p ./dist/
@echo 'Building dist/minilog.js'
./node_modules/gluejs/bin/gluejs \
--include ./lib/web \
--exclude package.json \
$(DEFAULTS) \
--command 'uglifyjs --no-copyright --mangle-toplevel'
build-debug:
@mkdir -p ./dist/
@echo 'Building dist/minilog.js'
./node_modules/gluejs/bin/gluejs \
$(DEFAULTS) \
--include ./lib/web \
--command 'uglifyjs --beautify'
gzip:
cat dist/minilog.js | gzip | wc -c
test:
@mocha \
--ui exports \
--reporter spec \
--slow 2000ms \
--bail \
$(TESTS)
formatters:
@node test/example/themes_example.js
.PHONY: build build-debug test formatters