From 92db51939019ff82f4240cef17a6c1f4c051b41c Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 15 Jun 2010 18:05:03 -0400 Subject: [PATCH] (dist) wrap script in anonymous function --- Makefile | 2 ++ lib/less/browser.js | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4e26a3c..209fa95 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,14 @@ less: @@mkdir -p dist @@touch ${DIST} @@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST} + @@echo "(function (window, undefined) {" >> ${DIST} @@cat 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 diff --git a/lib/less/browser.js b/lib/less/browser.js index d60bc76..097512c 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -1,4 +1,6 @@ -(function () { +// +// browser.js - client-side engine +// var isFileProtocol = location.protocol === 'file:'; @@ -292,4 +294,3 @@ less.Parser.importer = function (path, paths, callback) { }); }; -})();