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
|
|
|
|
BUILD = build/less.js
|
|
|
|
BUILD_MIN = build/less.min.js
|
|
|
|
HEADER = build/header.js
|
|
|
|
VERSION = `cat VERSION`
|
|
|
|
|
|
|
|
less:
|
|
|
|
@@mkdir -p build
|
2010-03-23 11:12:58 +08:00
|
|
|
@@cat lib/ext/*.js\
|
|
|
|
${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\
|
|
|
|
${SRC}/browser.js > ${BUILD}
|
2010-03-19 06:13:27 +08:00
|
|
|
@@echo ${BUILD} built.
|
|
|
|
|
|
|
|
min: less
|
|
|
|
@@echo Minifying...
|
|
|
|
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${BUILD_MIN}
|
|
|
|
@@java -jar build/compiler.jar\
|
|
|
|
--js ${BUILD} >> ${BUILD_MIN}
|
|
|
|
|
|
|
|
.PHONY: test benchmark
|