forked from jeffchan/truncate.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (27 loc) · 846 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
PKGDIR = pkg
define USAGE
Usage instructions:
make lint runs jshint on the source code
make test runs the test suite using phantomjs
make build creates a production (minified) build
make help displays this message
endef
export USAGE
default: help
help:
@echo "$$USAGE"
pkgdir:
@rm -rf $(PKGDIR)
@mkdir -p $(PKGDIR)
concat: pkgdir
@cat truncate.js > $(PKGDIR)/jquery.truncate.js
@echo Created $(PKGDIR)/jquery.truncate.js
minify: concat
@`npm bin`/uglifyjs $(PKGDIR)/jquery.truncate.js -mo $(PKGDIR)/jquery.truncate.min.js
@echo Created $(PKGDIR)/jquery.truncate.min.js
test:
@`npm bin`/mocha-phantomjs test/truncate-test.html
lint:
@`npm bin`/jshint -c jshint.json truncate.js
build: concat minify
.PHONY: help pkgdir concat minify test lint build