Added make min for minification though google's js closure compiler.

This commit is contained in:
cloudhead 2010-03-18 14:35:56 -04:00
parent 742bb32308
commit 098474d9e6
2 changed files with 20 additions and 5 deletions

7
build/header.js Normal file
View File

@ -0,0 +1,7 @@
//
// LESS - Leaner CSS v@VERSION
// http://lesscss.org
//
// Copyright (c) 2010, Alexis Sellier
// Licensed under the MIT license.
//

View File

@ -10,18 +10,26 @@ test:
benchmark:
node benchmark/less-benchmark.js
SRC = lib/less
#
# 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
@@cat ${SRC}/parser.js\
${SRC}/functions.js\
${SRC}/tree/*.js > build/less.js
@@echo build/less.js built.
${SRC}/tree/*.js > ${BUILD}
@@echo ${BUILD} built.
min:
min: less
@@echo Minifying...
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${BUILD_MIN}
@@java -jar build/compiler.jar\
--js ${BUILD} >> ${BUILD_MIN}
.PHONY: test benchmark