11
node benchmark/less-benchmark.js
17
HEADER = build/header.js
18
VERSION = `cat package.json | grep version \
19
| grep -o '[0-9]\.[0-9]\.[0-9]\+'`
20
DIST = dist/less-${VERSION}.js
21
RHINO = dist/less-rhino-${VERSION}.js
22
DIST_MIN = dist/less-${VERSION}.min.js
24
browser-prepare: DIST := test/browser/less.js
26
alpha: DIST := dist/less-${VERSION}-alpha.js
27
alpha: DIST_MIN := dist/less-${VERSION}-alpha.min.js
29
beta: DIST := dist/less-${VERSION}-beta.js
30
beta: DIST_MIN := dist/less-${VERSION}-beta.min.js
35
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST}
36
@@echo "(function (window, undefined) {" >> ${DIST}
37
@@cat build/require.js\
46
${SRC}/import-visitor.js\
47
${SRC}/join-selector-visitor.js\
48
${SRC}/extend-visitor.js\
50
build/amd.js >> ${DIST}
51
@@echo "})(window);" >> ${DIST}
55
node test/browser-test-prepare.js
57
browser-test: browser-prepare
58
phantomjs test/browser/phantom-runner.js
60
browser-test-server: browser-prepare
61
phantomjs test/browser/phantom-runner.js --no-tests
66
@@cat build/require-rhino.js\
71
${SRC}/import-visitor.js\
72
${SRC}/join-selector-visitor.js\
73
${SRC}/extend-visitor.js\
78
${SRC}/rhino.js > ${RHINO}
79
@@echo ${RHINO} built.
83
@@uglifyjs ${DIST} > ${DIST_MIN}
84
@@echo ${DIST_MIN} built.
92
git commit -m "Update alpha ${VERSION}"
96
git commit -a -m "(dist) build ${VERSION}"
97
git archive master --prefix=less/ -o less-${VERSION}.tar.gz
98
npm publish less-${VERSION}.tar.gz
101
npm tag less@${VERSION} stable
104
.PHONY: test benchmark