2010-03-19 06:13:27 +08:00
|
|
|
#
|
|
|
|
# Run all tests
|
|
|
|
#
|
|
|
|
test:
|
|
|
|
node test/less-test.js
|
|
|
|
|
|
|
|
#
|
|
|
|
# Run benchmark
|
|
|
|
#
|
|
|
|
benchmark:
|
|
|
|
node benchmark/less-benchmark.js
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build less.js
|
|
|
|
#
|
|
|
|
SRC = lib/less
|
2010-03-27 14:24:39 +08:00
|
|
|
DIST = dist/less.js
|
|
|
|
DIST_MIN = dist/less.min.js
|
2010-03-19 06:13:27 +08:00
|
|
|
HEADER = build/header.js
|
|
|
|
VERSION = `cat VERSION`
|
|
|
|
|
|
|
|
less:
|
2010-03-30 10:24:09 +08:00
|
|
|
@@mkdir -p dist
|
|
|
|
@@cat build/compat.js\
|
2010-03-23 11:12:58 +08:00
|
|
|
${SRC}/parser.js\
|
2010-03-19 06:13:27 +08:00
|
|
|
${SRC}/functions.js\
|
2010-03-23 11:12:58 +08:00
|
|
|
${SRC}/tree/*.js\
|
2010-03-30 10:24:09 +08:00
|
|
|
${SRC}/tree.js\
|
2010-03-27 14:24:39 +08:00
|
|
|
${SRC}/browser.js > ${DIST}
|
|
|
|
@@echo ${DIST} built.
|
2010-03-19 06:13:27 +08:00
|
|
|
|
|
|
|
min: less
|
2010-03-30 10:24:09 +08:00
|
|
|
@@echo minifying...
|
2010-03-27 14:24:39 +08:00
|
|
|
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST_MIN}
|
2010-03-19 06:13:27 +08:00
|
|
|
@@java -jar build/compiler.jar\
|
2010-03-27 14:24:39 +08:00
|
|
|
--js ${DIST} >> ${DIST_MIN}
|
2010-03-19 06:13:27 +08:00
|
|
|
|
|
|
|
.PHONY: test benchmark
|