carto/Makefile

58 lines
1.1 KiB
Makefile
Raw Normal View History

2010-03-19 06:13:27 +08:00
#
# Run all tests
#
test:
@@node test/mess-test.js
2010-03-19 06:13:27 +08:00
#
# Run benchmark
#
benchmark:
node benchmark/less-benchmark.js
#
# Build less.js
#
SRC = lib/less
HEADER = build/header.js
VERSION = `cat package.json | grep version \
| grep -o '[0-9]\.[0-9]\.[0-9]\+'`
DIST = dist/less-${VERSION}.js
DIST_MIN = dist/less-${VERSION}.min.js
2010-03-19 06:13:27 +08:00
less:
@@mkdir -p dist
@@touch ${DIST}
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST}
@@echo "(function (window, undefined) {" >> ${DIST}
2010-06-16 06:54:46 +08:00
@@cat build/require.js\
build/ecma-5.js\
${SRC}/parser.js\
2010-03-19 06:13:27 +08:00
${SRC}/functions.js\
${SRC}/tree/*.js\
${SRC}/tree.js\
${SRC}/browser.js >> ${DIST}
@@echo "})(window);" >> ${DIST}
@@echo ${DIST} built.
2010-03-19 06:13:27 +08:00
min: less
@@echo minifying...
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST_MIN}
2010-03-19 06:13:27 +08:00
@@java -jar build/compiler.jar\
--js ${DIST} >> ${DIST_MIN}
2010-03-19 06:13:27 +08:00
2010-07-08 06:55:20 +08:00
clean:
git rm dist/*
dist: clean min
git add dist/*
git commit -a -m "(dist) build ${VERSION}"
git archive master --prefix=less/ -o less-${VERSION}.tar.gz
npm publish less-${VERSION}.tar.gz
stable:
npm tag less ${VERSION} stable
2010-03-19 06:13:27 +08:00
.PHONY: test benchmark