-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
53 lines (42 loc) · 1.35 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
49
50
51
52
53
DEVELOPMENT=env NODE_ENV=development
PRODUCTION=env NODE_ENV=production
NODE=./node_modules/.bin/babel-node
LINT=./node_modules/.bin/eslint
TEST=./node_modules/.bin/mocha
TEST_DIRECT=./node_modules/.bin/_mocha
TEST_COMPILERS=js:babel/register
DOCS=./node_modules/.bin/jsdoc
COMPILE=./node_modules/.bin/babel
BUILD=./node_modules/.bin/webpack
DEV_SERVER=./node_modules/.bin/webpack-dev-server
usage:
@echo PACKAGE
@echo - prepublish .... tests, rebuilds lib, dist and docs.
@echo - build ......... builds and optimizes distributables.
@echo - devel ......... rebuilds on file change.
@echo - clean ......... removes the built artifacts.
@echo
@echo META
@echo - docs .......... compiles the docs from the sources.
@echo - lint .......... lints the source.
@echo - test .......... runs the unit tests.
@echo - test-watch .... reruns the unit tests on file change.
prepublish: clean lint test docs compile build
clean:
@rm -rf dist lib docs
devel:
@$(DEVELOPMENT) $(DEV_SERVER) --config .webpackrc
lint:
@$(LINT) src
compile:
@$(COMPILE) -q -d lib src
build: clean
@$(PRODUCTION) $(BUILD) --config .webpackrc
test:
@$(TEST) --compilers $(TEST_COMPILERS) test/index.js
test-watch:
@$(TEST) -bw -R min --compilers $(TEST_COMPILERS) test/index.js
docs:
-@$(DOCS) --configure .jsdocrc
.PHONY: usage prepublish clean devel\
build docs lint test test-watch