forked from linkedin/dustjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
102 lines (87 loc) · 1.85 KB
/
Makefile
File metadata and controls
102 lines (87 loc) · 1.85 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Run all tests
#
test:
node test/server.js
#
# Run jasmine-test
#
jasmine:
node test/jasmine-test/server/specRunner.js
#
# Run code coverage and generate report
#
coverage:
cover run test/server.js && cover report && cover report html
#
# Run the benchmarks
#
bench:
node benchmark/server.js
#
# Build the docs
#
docs:
node docs/build.js
#
# Build the parser
#
parser:
node src/build.js
#
# Build dust.js
#
SRC = lib
VERSION = ${shell cat package.json | grep version | grep -o '[0-9]\.[0-9]\.[0-9]\+'}
CORE = dist/dust-core-${VERSION}.js
CORE_MIN = dist/dust-core-${VERSION}.min.js
FULL = dist/dust-full-${VERSION}.js
FULL_MIN = dist/dust-full-${VERSION}.min.js
define HEADER
//
// Dust - Asynchronous Templating v1.2.3
//
// Original source (up to v0.30, Jan 2011)
// http://akdubya.github.com/dustjs
//
// Copyright (c) 2010, Aleksander Williams
// Released under the MIT License.
//
// Active Fork
// http://linkedin.github.io/dustjs/
// Core - Runtime code for rendering templates
// Full - code for compiling and rendering templates
//
endef
export HEADER
#TODO: REMOVE THE HELPERS IN THE NEXT RELEASE
dust:
@@mkdir -p dist
@@touch ${CORE}
@@echo "$$HEADER" > ${CORE}
@@cat ${SRC}/umdheader.js\
${SRC}/dust.js\
${SRC}/umdfooter.js >> ${CORE}
@@echo ${CORE} built
@@touch ${FULL}
@@echo "$$HEADER" > ${FULL}
@@cat ${SRC}/umdheader.js\
${SRC}/dust.js\
${SRC}/compiler.js\
${SRC}/parser.js\
${SRC}/umdfooter.js >> ${FULL}
@@echo ${FULL} built
min: dust
@@echo minifying...
@@echo "$$HEADER" > ${CORE_MIN}
@@echo "$$HEADER" > ${FULL_MIN}
node utils/minifier ${CORE} ${CORE_MIN}
node utils/minifier ${FULL} ${FULL_MIN}
clean:
git rm dist/*
release: clean docs min
git add dist/*
git commit -a -m "release v${VERSION}"
git tag -a -m "version v${VERSION}" v${VERSION}
npm publish
.PHONY: test docs bench parser