(dist) require() goes in its own file
This commit is contained in:
parent
98b8d31368
commit
b195601898
3
Makefile
3
Makefile
@ -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
4
build/require.js
Normal file
@ -0,0 +1,4 @@
|
||||
function require(arg) {
|
||||
return window.less[arg.split('/')[1]];
|
||||
};
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user