carto/Makefile
Konstantin Käfer 5241f62bfd update test runner to be more verbose and show what failed on errors
uses node-xml2js to compare xml files
use ndistro to install dependencies

Conflicts:

	lib/mess/parser.js
	test/mess-test.js
2011-01-19 12:22:24 -05:00

58 lines
1.1 KiB
Makefile

#
# Run all tests
#
test:
@@node test/mess-test.js
#
# 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
less:
@@mkdir -p dist
@@touch ${DIST}
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST}
@@echo "(function (window, undefined) {" >> ${DIST}
@@cat build/require.js\
build/ecma-5.js\
${SRC}/parser.js\
${SRC}/functions.js\
${SRC}/tree/*.js\
${SRC}/tree.js\
${SRC}/browser.js >> ${DIST}
@@echo "})(window);" >> ${DIST}
@@echo ${DIST} built.
min: less
@@echo minifying...
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST_MIN}
@@java -jar build/compiler.jar\
--js ${DIST} >> ${DIST_MIN}
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
.PHONY: test benchmark