This repository has been archived by the owner on Oct 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (36 loc) · 1.9 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
LICENSE_COMMENT="/*! obs-model-validation 0.3.0 Copyright (c) 2013 Alan Plum. MIT licensed. @preserve */"
test:
@./node_modules/.bin/mocha \
--growl \
--reporter spec \
spec/*.spec.js
clean:
@rm -rf dist
dist/vendor: clean
@mkdir -p dist
dist/obs-model-validation.js: dist/vendor
@echo $(LICENSE_COMMENT) > dist/obs-model-validation.js
@cat src/obs-model-validation.js >> dist/obs-model-validation.js
dist/obs-model-validation.globals.js: dist/vendor
@echo $(LICENSE_COMMENT) > dist/obs-model-validation.globals.js
@echo "(function(root){\
var require=function(key){return root[key];},\
module={};" >> dist/obs-model-validation.globals.js
@cat src/obs-model-validation.js >> dist/obs-model-validation.globals.js
@echo "root.obsModelValidation = module.exports;\
}(this));" >> dist/obs-model-validation.globals.js
dist/obs-model-validation.amd.js: dist/vendor
@echo $(LICENSE_COMMENT) > dist/obs-model-validation.amd.js
@echo "define(function(require, exports, module) {" >> dist/obs-model-validation.amd.js
@cat src/obs-model-validation.js >> dist/obs-model-validation.amd.js
@echo "return module.exports;});" >> dist/obs-model-validation.amd.js
dist/obs-model-validation.min.js: dist/obs-model-validation.js
@./node_modules/.bin/uglifyjs dist/obs-model-validation.js --comments -m > dist/obs-model-validation.min.js
dist/obs-model-validation.globals.min.js: dist/obs-model-validation.globals.js
@./node_modules/.bin/uglifyjs dist/obs-model-validation.globals.js --comments -m > dist/obs-model-validation.globals.min.js
dist/obs-model-validation.amd.min.js: dist/obs-model-validation.amd.js
@./node_modules/.bin/uglifyjs dist/obs-model-validation.amd.js --comments > dist/obs-model-validation.amd.min.js
dist: dist/obs-model-validation.min.js dist/obs-model-validation.globals.min.js dist/obs-model-validation.amd.min.js
lint:
@./node_modules/.bin/jshint src/obs-model-validation.js spec
.PHONY: lint test clean