forked from LinkedInAttic/dustjs-helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (48 loc) · 1.04 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
54
55
56
57
58
59
60
61
62
#
# Run all tests
#
test:
node test/server.js
#
# Run jasmine-test
#
jasmine:
node test/jasmine-test/server/specRunner.js helpersTests
#
# Run code coverage and generate report
#
coverage:
cover run test/server.js && cover report && cover report html
#
# Build the docs
#
docs:
node docs/build.js
#
# Build dust.js
#
VERSION = ${shell cat package.json | grep version | grep -o '[0-9]\.[0-9]\.[0-9]\+'}
SRC = lib
VERSION = ${shell cat package.json | grep version | grep -o '[0-9]\.[0-9]\.[0-9]\+'}
HELPERS = dist/dust-helpers-${VERSION}.js
define HEADER
//
// Dust-helpers - Additional functionality for dustjs-linkedin package v${VERSION}
//
// Copyright (c) 2012, LinkedIn
// Released under the MIT License.
//
endef
export HEADER
helpers:
@@mkdir -p dist
@@touch ${HELPERS}
@@echo "$$HEADER" > ${HELPERS}
@@cat ${SRC}/dust-helpers.js >> ${HELPERS}
@@echo ${HELPERS} built
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