(dist) require() goes in its own file

This commit is contained in:
cloudhead 2010-06-15 18:54:46 -04:00
parent 98b8d31368
commit b195601898
3 changed files with 7 additions and 8 deletions

View File

@ -25,7 +25,8 @@ less:
@@touch ${DIST}
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST}
@@echo "(function (window, undefined) {" >> ${DIST}
@@cat build/ecma-5.js\
@@cat build/require.js\
build/ecma-5.js\
${SRC}/parser.js\
${SRC}/functions.js\
${SRC}/tree/*.js\

4
build/require.js Normal file
View File

@ -0,0 +1,4 @@
function require(arg) {
return window.less[arg.split('/')[1]];
};

View File

@ -5,13 +5,7 @@ if (typeof(window) === 'undefined') {
tree = require('less/tree');
} else {
less = window.less = {},
tree = {};
var require = function (arg) {
if (arg === 'less/tree') {
return tree;
}
};
tree = window.less.tree = {};
}
//
// less.js - parser