From 098474d9e6dbb31f1a949c507686f64c07ecac49 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 18 Mar 2010 14:35:56 -0400 Subject: [PATCH] Added `make min` for minification though google's js closure compiler. --- build/header.js | 7 +++++++ makefile | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 build/header.js diff --git a/build/header.js b/build/header.js new file mode 100644 index 0000000..bc7ae23 --- /dev/null +++ b/build/header.js @@ -0,0 +1,7 @@ +// +// LESS - Leaner CSS v@VERSION +// http://lesscss.org +// +// Copyright (c) 2010, Alexis Sellier +// Licensed under the MIT license. +// diff --git a/makefile b/makefile index 6c97d1a..4ebee37 100644 --- a/makefile +++ b/makefile @@ -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