move functions into its own folder and give it a set interface

This commit is contained in:
Luke Page
2014-08-16 13:17:35 +01:00
parent 953f70c879
commit d7e7ddba44
18 changed files with 807 additions and 763 deletions

View File

@@ -54,11 +54,7 @@ less.poll = less.poll || (isFileProtocol ? 1000 : 1500);
//Setup user functions
if (options.functions) {
for(var func in options.functions) {
if (options.functions.hasOwnProperty(func)) {
less.tree.functions[func] = options.functions[func];
}
}
less.functions.functionRegistry.addMultiple(options.functions);
}
var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);
@@ -352,7 +348,7 @@ function loadStyleSheet(sheet, callback, reload, remaining, modifyVars) {
}
less.environment.loadFile(env, sheet.href, null, function loadInitialFileCallback(e, data, path, webInfo) {
var newFileInfo = {
currentDirectory: less.environment.getPath(env, path),
filename: path,