[Pkg-javascript-commits] [less.js] 252/285: v2-b3 release
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:23:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v2.0.0
in repository less.js.
commit 6d6833736deda7e38423374f70169ac8c74ef99a
Author: Luke Page <luke.a.page at gmail.com>
Date: Sat Nov 1 17:41:28 2014 +0000
v2-b3 release
---
CHANGELOG.md | 9 ++
bower.json | 2 +-
dist/less.js | 483 +++++++++++++++++++++++++------------------------------
dist/less.min.js | 12 +-
package.json | 4 +-
5 files changed, 237 insertions(+), 273 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a125366..13b6712 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# 2.0.0-b3
+
+2014-11-01
+
+ - some refactoring of browser structure to allow use of api vs normal browser bundle
+ - browser bundle no longer leaks require
+ - browser can now be scoped with just window
+ - browser useFileCache defaults to true, but file cache is now cleared when refreshing or in watch mode
+
# 2.0.0-b2
2014-10-26
diff --git a/bower.json b/bower.json
index 3ce497e..87b788b 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "less",
- "version": "2.0.0-b2",
+ "version": "2.0.0-b3",
"main": "./dist/less.js",
"ignore": [
"**/.*",
diff --git a/dist/less.js b/dist/less.js
index c94511a..31c2261 100644
--- a/dist/less.js
+++ b/dist/less.js
@@ -1,5 +1,5 @@
/*!
- * Less - Leaner CSS v2.0.0-b2
+ * Less - Leaner CSS v2.0.0-b3
* http://lesscss.org
*
* Copyright (c) 2009-2014, Alexis Sellier <self at cloudhead.net>
@@ -10,7 +10,77 @@
/** * @license Apache v2
*/
-require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.less=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find [...]
+var addDataAttr = require("./utils").addDataAttr,
+ browser = require("./browser");
+
+module.exports = function(window, options) {
+
+ // use options from the current script tag data attribues
+ addDataAttr(options, browser.currentScript(window));
+
+ if (options.isFileProtocol === undefined) {
+ options.isFileProtocol = /^(file|chrome(-extension)?|resource|qrc|app):/.test(window.location.protocol);
+ }
+
+ // Load styles asynchronously (default: false)
+ //
+ // This is set to `false` by default, so that the body
+ // doesn't start loading before the stylesheets are parsed.
+ // Setting this to `true` can result in flickering.
+ //
+ options.async = options.async || false;
+ options.fileAsync = options.fileAsync || false;
+
+ // Interval between watch polls
+ options.poll = options.poll || (options.isFileProtocol ? 1000 : 1500);
+
+ options.env = options.env || (window.location.hostname == '127.0.0.1' ||
+ window.location.hostname == '0.0.0.0' ||
+ window.location.hostname == 'localhost' ||
+ (window.location.port &&
+ window.location.port.length > 0) ||
+ options.isFileProtocol ? 'development'
+ : 'production');
+
+ var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(window.location.hash);
+ if (dumpLineNumbers) {
+ options.dumpLineNumbers = dumpLineNumbers[1];
+ }
+
+ if (options.useFileCache === undefined) {
+ options.useFileCache = true;
+ }
+
+};
+
+},{"./browser":3,"./utils":9}],2:[function(require,module,exports){
+/**
+ * Kicks off less and compiles any stylesheets
+ * used in the browser distributed version of less
+ * to kick-start less using the browser api
+ */
+/*global window */
+
+// shim Promise if required
+require('promise/polyfill.js');
+
+var options = window.less || {};
+require("./add-default-options")(window, options);
+
+var less = module.exports = require("./index")(window, options);
+
+if (/!watch/.test(window.location.hash)) {
+ less.watch();
+}
+
+less.pageLoadFinished = less.registerStylesheets().then(
+ function () {
+ return less.refresh(less.env === 'development');
+ }
+);
+
+},{"./add-default-options":1,"./index":7,"promise/polyfill.js":undefined}],3:[function(require,module,exports){
var utils = require("./utils");
module.exports = {
createCSS: function (document, styles, sheet) {
@@ -66,10 +136,17 @@ module.exports = {
throw new Error("Couldn't reassign styleSheet.cssText.");
}
}
+ },
+ currentScript: function(window) {
+ var document = window.document;
+ return document.currentScript || (function() {
+ var scripts = document.getElementsByTagName("script");
+ return scripts[scripts.length - 1];
+ })();
}
};
-},{"./utils":7}],2:[function(require,module,exports){
+},{"./utils":9}],4:[function(require,module,exports){
// Cache system is a bit outdated and could do with work
module.exports = function(window, options, logger) {
@@ -106,7 +183,7 @@ module.exports = function(window, options, logger) {
};
};
-},{}],3:[function(require,module,exports){
+},{}],5:[function(require,module,exports){
var utils = require("./utils"),
browser = require("./browser");
@@ -278,10 +355,10 @@ module.exports = function(window, less, options) {
};
};
-},{"./browser":1,"./utils":7}],4:[function(require,module,exports){
+},{"./browser":3,"./utils":9}],6:[function(require,module,exports){
/*global window, XMLHttpRequest */
-module.exports = function(options, isFileProtocol, logger) {
+module.exports = function(options, logger) {
var PromiseConstructor = typeof Promise === 'undefined' ? require('promise') : Promise,
AbstractFileManager = require("../less/environment/abstract-file-manager.js");
@@ -289,7 +366,6 @@ var PromiseConstructor = typeof Promise === 'undefined' ? require('promise') : P
var fileCache = {};
//TODOS - move log somewhere. pathDiff and doing something similar in node. use pathDiff in the other browser file for the initial load
-// isFileProtocol is global
function getXMLHttpRequest() {
if (window.XMLHttpRequest && (window.location.protocol !== "file:" || !("ActiveXObject" in window))) {
@@ -322,7 +398,7 @@ FileManager.prototype.join = function join(basePath, laterPath) {
FileManager.prototype.doXHR = function doXHR(url, type, callback, errback) {
var xhr = getXMLHttpRequest();
- var async = isFileProtocol ? options.fileAsync : options.async;
+ var async = options.isFileProtocol ? options.fileAsync : options.async;
if (typeof(xhr.overrideMimeType) === 'function') {
xhr.overrideMimeType('text/css');
@@ -341,7 +417,7 @@ FileManager.prototype.doXHR = function doXHR(url, type, callback, errback) {
}
}
- if (isFileProtocol && !options.fileAsync) {
+ if (options.isFileProtocol && !options.fileAsync) {
if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {
callback(xhr.responseText);
} else {
@@ -361,6 +437,10 @@ FileManager.prototype.supports = function(filename, currentDirectory, options, e
return true;
};
+FileManager.prototype.clearFileCache = function() {
+ fileCache = {};
+};
+
FileManager.prototype.loadFile = function loadFile(filename, currentDirectory, options, environment) {
return new PromiseConstructor(function(fullfill, reject) {
if (currentDirectory && !this.isPathAbsolute(filename)) {
@@ -399,76 +479,34 @@ FileManager.prototype.loadFile = function loadFile(filename, currentDirectory, o
return FileManager;
};
-},{"../less/environment/abstract-file-manager.js":12,"promise":undefined}],5:[function(require,module,exports){
+},{"../less/environment/abstract-file-manager.js":14,"promise":undefined}],7:[function(require,module,exports){
//
-// browser.js - client-side engine
+// index.js
+// Should expose the additional browser functions on to the less object
//
-/*global window, document, location */
-
-var less;
-var addDataAttr = require("./utils").addDataAttr;
-
-/*
- TODO - options is now hidden - we should expose it on the less object, but not have it "as" the less object
- less = { fileAsync: true }
- then access as less.environment.options.fileAsync ?
- */
-
-var isFileProtocol = /^(file|chrome(-extension)?|resource|qrc|app):/.test(window.location.protocol),
- options = window.less || {};
-
-// use options from the current script tag data attribues
-var script = document.currentScript || (function() {
- var scripts = document.getElementsByTagName("script");
- return scripts[scripts.length - 1];
-})();
-options = addDataAttr(options, script);
-
-// shim Promise if required
-require('promise/polyfill.js');
+var addDataAttr = require("./utils").addDataAttr,
+ browser = require("./browser");
-window.less = less = require('../less')();
+module.exports = function(window, options) {
+var document = window.document;
+var less = require('../less')();
+module.exports = less;
+less.options = options;
var environment = less.environment,
- FileManager = require("./file-manager")(options, isFileProtocol, less.logger),
+ FileManager = require("./file-manager")(options, less.logger),
fileManager = new FileManager();
environment.addFileManager(fileManager);
less.FileManager = FileManager;
require("./log-listener")(less, options);
var errors = require("./error-reporting")(window, less, options);
-var browser = require("./browser");
var cache = less.cache = options.cache || require("./cache")(window, options, less.logger);
-options.env = options.env || (window.location.hostname == '127.0.0.1' ||
- window.location.hostname == '0.0.0.0' ||
- window.location.hostname == 'localhost' ||
- (window.location.port &&
- window.location.port.length > 0) ||
- isFileProtocol ? 'development'
- : 'production');
-
-// Load styles asynchronously (default: false)
-//
-// This is set to `false` by default, so that the body
-// doesn't start loading before the stylesheets are parsed.
-// Setting this to `true` can result in flickering.
-//
-options.async = options.async || false;
-options.fileAsync = options.fileAsync || false;
-
-// Interval between watch polls
-options.poll = options.poll || (isFileProtocol ? 1000 : 1500);
-
//Setup user functions
if (options.functions) {
less.functions.functionRegistry.addMultiple(options.functions);
}
-var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);
-if (dumpLineNumbers) {
- options.dumpLineNumbers = dumpLineNumbers[1];
-}
-
var typePattern = /^text\/(x-)?less$/;
function postProcessCSS(styles) {
@@ -509,10 +547,6 @@ function loadStyles(modifyVars) {
var lessText = style.innerHTML || '';
instanceOptions.filename = document.location.href.replace(/#.*$/, '');
- if (modifyVars || instanceOptions.globalVars) {
- instanceOptions.useFileCache = true;
- }
-
/*jshint loopfunc:true */
// use closure to store current style
less.render(lessText, instanceOptions)
@@ -533,15 +567,13 @@ function loadStyles(modifyVars) {
function loadStyleSheet(sheet, callback, reload, remaining, modifyVars) {
- var instanceOptions = addDataAttr(clone(options), sheet);
+ var instanceOptions = clone(options);
+ addDataAttr(instanceOptions, sheet);
instanceOptions.mime = sheet.type;
if (modifyVars) {
instanceOptions.modifyVars = modifyVars;
}
- if (modifyVars || options.globalVars) {
- instanceOptions.useFileCache = true;
- }
fileManager.loadFile(sheet.href, null, instanceOptions, environment)
.then(function loadInitialFileCallback(loadedFile) {
@@ -599,6 +631,7 @@ function initRunningMode(){
if (less.env === 'development') {
less.watchTimer = setInterval(function () {
if (less.watchMode) {
+ fileManager.clearFileCache();
loadStyleSheets(function (e, css, _, sheet, context) {
if (e) {
errors.add(e, e.href || sheet.href);
@@ -627,10 +660,6 @@ less.watch = function () {
less.unwatch = function () {clearInterval(less.watchTimer); this.watchMode = false; return false; };
-if (/!watch/.test(location.hash)) {
- less.watch();
-}
-
//
// Get all <link> tags with the 'rel' attribute set to "stylesheet/less"
//
@@ -655,10 +684,13 @@ less.registerStylesheets = function() {
// CSS without reloading less-files
//
less.modifyVars = function(record) {
- return less.refresh(false, record);
+ return less.refresh(true, record, false);
};
-less.refresh = function (reload, modifyVars) {
+less.refresh = function (reload, modifyVars, clearFileCache) {
+ if ((reload || clearFileCache) && clearFileCache !== false) {
+ fileManager.clearFileCache();
+ }
return new Promise(function (resolve, reject) {
var startTime, endTime, totalMilliseconds;
startTime = endTime = new Date();
@@ -695,14 +727,10 @@ less.refresh = function (reload, modifyVars) {
};
less.refreshStyles = loadStyles;
+ return less;
+};
-less.pageLoadFinished = less.registerStylesheets().then(
- function () {
- return less.refresh(less.env === 'development');
- }
-);
-
-},{"../less":27,"./browser":1,"./cache":2,"./error-reporting":3,"./file-manager":4,"./log-listener":6,"./utils":7,"promise/polyfill.js":92}],6:[function(require,module,exports){
+},{"../less":29,"./browser":3,"./cache":4,"./error-reporting":5,"./file-manager":6,"./log-listener":8,"./utils":9}],8:[function(require,module,exports){
module.exports = function(less, options) {
var logLevel_debug = 4,
@@ -747,7 +775,7 @@ module.exports = function(less, options) {
}
};
-},{}],7:[function(require,module,exports){
+},{}],9:[function(require,module,exports){
module.exports = {
extractId: function(href) {
return href.replace(/^[a-z-]+:\/+?[^\/]+/, '' ) // Remove protocol & domain
@@ -757,18 +785,19 @@ module.exports = {
.replace(/\./g, ':'); // Replace dots with colons(for valid id)
},
addDataAttr: function(options, tag) {
- for (var opt in tag.dataset)
+ for (var opt in tag.dataset) {
if (tag.dataset.hasOwnProperty(opt)) {
- if (opt === "env" || opt === "dumpLineNumbers" || opt === "rootpath" || opt === "errorReporting")
+ if (opt === "env" || opt === "dumpLineNumbers" || opt === "rootpath" || opt === "errorReporting") {
options[opt] = tag.dataset[opt];
- else
+ } else {
options[opt] = JSON.parse(tag.dataset[opt]);
+ }
}
- return options;
+ }
}
};
-},{}],8:[function(require,module,exports){
+},{}],10:[function(require,module,exports){
var contexts = {};
module.exports = contexts;
@@ -878,7 +907,7 @@ contexts.Eval.prototype.normalizePath = function( path ) {
//todo - do the same for the toCSS ?
-},{}],9:[function(require,module,exports){
+},{}],11:[function(require,module,exports){
module.exports = {
'aliceblue':'#f0f8ff',
'antiquewhite':'#faebd7',
@@ -1029,13 +1058,13 @@ module.exports = {
'yellow':'#ffff00',
'yellowgreen':'#9acd32'
};
-},{}],10:[function(require,module,exports){
+},{}],12:[function(require,module,exports){
module.exports = {
colors: require("./colors"),
unitConversions: require("./unit-conversions")
};
-},{"./colors":9,"./unit-conversions":11}],11:[function(require,module,exports){
+},{"./colors":11,"./unit-conversions":13}],13:[function(require,module,exports){
module.exports = {
length: {
'm': 1,
@@ -1057,12 +1086,16 @@ module.exports = {
'turn': 1
}
};
-},{}],12:[function(require,module,exports){
+},{}],14:[function(require,module,exports){
var abstractFileManager = function() {
};
abstractFileManager.prototype.getPath = function (filename) {
- var j = filename.lastIndexOf('/');
+ var j = filename.lastIndexOf('?');
+ if (j < 0) {
+ filename = filename.slice(0, j);
+ }
+ j = filename.lastIndexOf('/');
if (j < 0) {
j = filename.lastIndexOf('\\');
}
@@ -1174,7 +1207,7 @@ abstractFileManager.prototype.extractUrlParts = function extractUrlParts(url, ba
module.exports = abstractFileManager;
-},{}],13:[function(require,module,exports){
+},{}],15:[function(require,module,exports){
var environment = function(externalEnvironment, fileManagers) {
this.fileManagers = fileManagers || [];
externalEnvironment = externalEnvironment || {};
@@ -1218,7 +1251,7 @@ environment.prototype.clearFileManagers = function () {
module.exports = environment;
-},{}],14:[function(require,module,exports){
+},{}],16:[function(require,module,exports){
var Color = require("../tree/color"),
functionRegistry = require("./function-registry");
@@ -1294,7 +1327,7 @@ for (var f in colorBlendModeFunctions) {
functionRegistry.addMultiple(colorBlend);
-},{"../tree/color":44,"./function-registry":19}],15:[function(require,module,exports){
+},{"../tree/color":46,"./function-registry":21}],17:[function(require,module,exports){
var Dimension = require("../tree/dimension"),
Color = require("../tree/color"),
Quoted = require("../tree/quoted"),
@@ -1573,7 +1606,7 @@ colorFunctions = {
};
functionRegistry.addMultiple(colorFunctions);
-},{"../tree/anonymous":40,"../tree/color":44,"../tree/dimension":50,"../tree/quoted":67,"./function-registry":19}],16:[function(require,module,exports){
+},{"../tree/anonymous":42,"../tree/color":46,"../tree/dimension":52,"../tree/quoted":69,"./function-registry":21}],18:[function(require,module,exports){
module.exports = function(environment) {
var Anonymous = require("../tree/anonymous"),
URL = require("../tree/url"),
@@ -1652,7 +1685,7 @@ module.exports = function(environment) {
});
};
-},{"../logger":29,"../tree/anonymous":40,"../tree/url":74,"./function-registry":19}],17:[function(require,module,exports){
+},{"../logger":31,"../tree/anonymous":42,"../tree/url":76,"./function-registry":21}],19:[function(require,module,exports){
var Keyword = require("../tree/keyword"),
functionRegistry = require("./function-registry");
@@ -1681,7 +1714,7 @@ functionRegistry.add("default", defaultFunc.eval.bind(defaultFunc));
module.exports = defaultFunc;
-},{"../tree/keyword":59,"./function-registry":19}],18:[function(require,module,exports){
+},{"../tree/keyword":61,"./function-registry":21}],20:[function(require,module,exports){
var functionRegistry = require("./function-registry");
var functionCaller = function(name, context, index, currentFileInfo) {
@@ -1700,7 +1733,7 @@ functionCaller.prototype.call = function(args) {
module.exports = functionCaller;
-},{"./function-registry":19}],19:[function(require,module,exports){
+},{"./function-registry":21}],21:[function(require,module,exports){
module.exports = {
_data: {},
add: function(name, func) {
@@ -1720,7 +1753,7 @@ module.exports = {
}
};
-},{}],20:[function(require,module,exports){
+},{}],22:[function(require,module,exports){
module.exports = function(environment) {
var functions = {
functionRegistry: require("./function-registry"),
@@ -1741,7 +1774,7 @@ module.exports = function(environment) {
return functions;
};
-},{"./color":15,"./color-blending":14,"./data-uri":16,"./default":17,"./function-caller":18,"./function-registry":19,"./math":21,"./number":22,"./string":23,"./svg":24,"./types":25}],21:[function(require,module,exports){
+},{"./color":17,"./color-blending":16,"./data-uri":18,"./default":19,"./function-caller":20,"./function-registry":21,"./math":23,"./number":24,"./string":25,"./svg":26,"./types":27}],23:[function(require,module,exports){
var Dimension = require("../tree/dimension"),
functionRegistry = require("./function-registry");
@@ -1784,7 +1817,7 @@ mathFunctions.round = function (n, f) {
functionRegistry.addMultiple(mathFunctions);
-},{"../tree/dimension":50,"./function-registry":19}],22:[function(require,module,exports){
+},{"../tree/dimension":52,"./function-registry":21}],24:[function(require,module,exports){
var Dimension = require("../tree/dimension"),
Anonymous = require("../tree/anonymous"),
functionRegistry = require("./function-registry");
@@ -1862,7 +1895,7 @@ functionRegistry.addMultiple({
}
});
-},{"../tree/anonymous":40,"../tree/dimension":50,"./function-registry":19}],23:[function(require,module,exports){
+},{"../tree/anonymous":42,"../tree/dimension":52,"./function-registry":21}],25:[function(require,module,exports){
var Quoted = require("../tree/quoted"),
Anonymous = require("../tree/anonymous"),
JavaScript = require("../tree/javascript"),
@@ -1897,7 +1930,7 @@ functionRegistry.addMultiple({
}
});
-},{"../tree/anonymous":40,"../tree/javascript":57,"../tree/quoted":67,"./function-registry":19}],24:[function(require,module,exports){
+},{"../tree/anonymous":42,"../tree/javascript":59,"../tree/quoted":69,"./function-registry":21}],26:[function(require,module,exports){
module.exports = function(environment) {
var Dimension = require("../tree/dimension"),
Color = require("../tree/color"),
@@ -1982,7 +2015,7 @@ module.exports = function(environment) {
});
};
-},{"../tree/anonymous":40,"../tree/color":44,"../tree/dimension":50,"../tree/url":74,"./function-registry":19}],25:[function(require,module,exports){
+},{"../tree/anonymous":42,"../tree/color":46,"../tree/dimension":52,"../tree/url":76,"./function-registry":21}],27:[function(require,module,exports){
var Keyword = require("../tree/keyword"),
Dimension = require("../tree/dimension"),
Color = require("../tree/color"),
@@ -2055,7 +2088,7 @@ functionRegistry.addMultiple({
}
});
-},{"../tree/anonymous":40,"../tree/color":44,"../tree/dimension":50,"../tree/keyword":59,"../tree/operation":65,"../tree/quoted":67,"../tree/url":74,"./function-registry":19}],26:[function(require,module,exports){
+},{"../tree/anonymous":42,"../tree/color":46,"../tree/dimension":52,"../tree/keyword":61,"../tree/operation":67,"../tree/quoted":69,"../tree/url":76,"./function-registry":21}],28:[function(require,module,exports){
var contexts = require("./contexts"),
Parser = require('./parser/parser');
@@ -2170,7 +2203,7 @@ module.exports = function(environment) {
return ImportManager;
};
-},{"./contexts":8,"./parser/parser":33}],27:[function(require,module,exports){
+},{"./contexts":10,"./parser/parser":35}],29:[function(require,module,exports){
module.exports = function(environment, fileManagers) {
var SourceMapOutput, SourceMapBuilder, ParseTree, ImportManager, Environment;
@@ -2200,7 +2233,7 @@ module.exports = function(environment, fileManagers) {
return less;
};
-},{"./contexts":8,"./data":10,"./environment/abstract-file-manager":12,"./environment/environment":13,"./functions":20,"./import-manager":26,"./less-error":28,"./logger":29,"./parse-tree":30,"./parser/parser":33,"./plugin-manager":34,"./render":35,"./source-map-builder":36,"./source-map-output":37,"./transform-tree":38,"./tree":56,"./utils":77,"./visitors":81}],28:[function(require,module,exports){
+},{"./contexts":10,"./data":12,"./environment/abstract-file-manager":14,"./environment/environment":15,"./functions":22,"./import-manager":28,"./less-error":30,"./logger":31,"./parse-tree":32,"./parser/parser":35,"./plugin-manager":36,"./render":37,"./source-map-builder":38,"./source-map-output":39,"./transform-tree":40,"./tree":58,"./utils":79,"./visitors":83}],30:[function(require,module,exports){
var utils = require("./utils");
var LessError = module.exports = function LessError(e, importManager, currentFilename) {
@@ -2237,7 +2270,7 @@ var LessError = module.exports = function LessError(e, importManager, currentFil
LessError.prototype = Object.create(Error.prototype);
LessError.prototype.constructor = LessError;
-},{"./utils":77}],29:[function(require,module,exports){
+},{"./utils":79}],31:[function(require,module,exports){
module.exports = {
error: function(msg) {
this._fireEvent("error", msg);
@@ -2273,7 +2306,7 @@ module.exports = {
_listeners: []
};
-},{}],30:[function(require,module,exports){
+},{}],32:[function(require,module,exports){
var LessError = require('./less-error'),
transformTree = require("./transform-tree");
@@ -2322,7 +2355,7 @@ ParseTree.prototype.toCSS = function(options) {
return ParseTree;
};
-},{"./less-error":28,"./transform-tree":38}],31:[function(require,module,exports){
+},{"./less-error":30,"./transform-tree":40}],33:[function(require,module,exports){
// Split the input into chunks.
module.exports = function (input, fail) {
var len = input.length, level = 0, parenLevel = 0,
@@ -2436,7 +2469,7 @@ module.exports = function (input, fail) {
return chunks;
};
-},{}],32:[function(require,module,exports){
+},{}],34:[function(require,module,exports){
var chunker = require('./chunker');
module.exports = function() {
@@ -2695,7 +2728,7 @@ module.exports = function() {
return parserInput;
};
-},{"./chunker":31}],33:[function(require,module,exports){
+},{"./chunker":33}],35:[function(require,module,exports){
var LessError = require('../less-error'),
tree = require("../tree"),
visitors = require("../visitors"),
@@ -4295,7 +4328,7 @@ Parser.serializeVars = function(vars) {
module.exports = Parser;
-},{"../less-error":28,"../tree":56,"../utils":77,"../visitors":81,"./parser-input":32}],34:[function(require,module,exports){
+},{"../less-error":30,"../tree":58,"../utils":79,"../visitors":83,"./parser-input":34}],36:[function(require,module,exports){
/**
* Plugin Manager
*/
@@ -4384,7 +4417,7 @@ PluginManager.prototype.getFileManagers = function() {
};
module.exports = PluginManager;
-},{}],35:[function(require,module,exports){
+},{}],37:[function(require,module,exports){
var PromiseConstructor = typeof Promise === 'undefined' ? require('promise') : Promise,
contexts = require("./contexts"),
Parser = require('./parser/parser'),
@@ -4451,7 +4484,7 @@ module.exports = function(environment, ParseTree, ImportManager) {
return render;
};
-},{"./contexts":8,"./parser/parser":33,"./plugin-manager":34,"promise":undefined}],36:[function(require,module,exports){
+},{"./contexts":10,"./parser/parser":35,"./plugin-manager":36,"promise":undefined}],38:[function(require,module,exports){
module.exports = function (SourceMapOutput) {
var SourceMapBuilder = function (options) {
@@ -4506,7 +4539,7 @@ module.exports = function (SourceMapOutput) {
return SourceMapBuilder;
};
-},{}],37:[function(require,module,exports){
+},{}],39:[function(require,module,exports){
module.exports = function (environment) {
var SourceMapOutput = function (options) {
@@ -4656,7 +4689,7 @@ module.exports = function (environment) {
return SourceMapOutput;
};
-},{}],38:[function(require,module,exports){
+},{}],40:[function(require,module,exports){
var contexts = require("./contexts"),
visitor = require("./visitors"),
tree = require("./tree");
@@ -4731,7 +4764,7 @@ module.exports = function(root, options) {
return evaldRoot;
};
-},{"./contexts":8,"./tree":56,"./visitors":81}],39:[function(require,module,exports){
+},{"./contexts":10,"./tree":58,"./visitors":83}],41:[function(require,module,exports){
var Node = require("./node");
var Alpha = function (val) {
@@ -4761,7 +4794,7 @@ Alpha.prototype.genCSS = function (context, output) {
module.exports = Alpha;
-},{"./node":64}],40:[function(require,module,exports){
+},{"./node":66}],42:[function(require,module,exports){
var Node = require("./node");
var Anonymous = function (value, index, currentFileInfo, mapLines, rulesetLike) {
@@ -4787,7 +4820,7 @@ Anonymous.prototype.genCSS = function (context, output) {
};
module.exports = Anonymous;
-},{"./node":64}],41:[function(require,module,exports){
+},{"./node":66}],43:[function(require,module,exports){
var Node = require("./node");
var Assignment = function (key, val) {
@@ -4817,7 +4850,7 @@ Assignment.prototype.genCSS = function (context, output) {
module.exports = Assignment;
-},{"./node":64}],42:[function(require,module,exports){
+},{"./node":66}],44:[function(require,module,exports){
var Node = require("./node");
var Attribute = function (key, op, value) {
@@ -4846,7 +4879,7 @@ Attribute.prototype.toCSS = function (context) {
};
module.exports = Attribute;
-},{"./node":64}],43:[function(require,module,exports){
+},{"./node":66}],45:[function(require,module,exports){
var Node = require("./node"),
FunctionCaller = require("../functions/function-caller");
//
@@ -4912,7 +4945,7 @@ Call.prototype.genCSS = function (context, output) {
};
module.exports = Call;
-},{"../functions/function-caller":18,"./node":64}],44:[function(require,module,exports){
+},{"../functions/function-caller":20,"./node":66}],46:[function(require,module,exports){
var Node = require("./node"),
colors = require("../data/colors");
@@ -5100,7 +5133,7 @@ Color.fromKeyword = function(keyword) {
};
module.exports = Color;
-},{"../data/colors":9,"./node":64}],45:[function(require,module,exports){
+},{"../data/colors":11,"./node":66}],47:[function(require,module,exports){
var Node = require("./node");
var Combinator = function (value) {
@@ -5125,7 +5158,7 @@ Combinator.prototype.genCSS = function (context, output) {
};
module.exports = Combinator;
-},{"./node":64}],46:[function(require,module,exports){
+},{"./node":66}],48:[function(require,module,exports){
var Node = require("./node"),
getDebugInfo = require("./debug-info");
@@ -5155,7 +5188,7 @@ Comment.prototype.isRulesetLike = function(root) {
};
module.exports = Comment;
-},{"./debug-info":48,"./node":64}],47:[function(require,module,exports){
+},{"./debug-info":50,"./node":66}],49:[function(require,module,exports){
var Node = require("./node");
var Condition = function (op, l, r, i, negate) {
@@ -5190,7 +5223,7 @@ Condition.prototype.eval = function (context) {
};
module.exports = Condition;
-},{"./node":64}],48:[function(require,module,exports){
+},{"./node":66}],50:[function(require,module,exports){
var debugInfo = function(context, ctx, lineSeperator) {
var result="";
if (context.dumpLineNumbers && !context.compress) {
@@ -5226,7 +5259,7 @@ debugInfo.asMediaQuery = function(ctx) {
module.exports = debugInfo;
-},{}],49:[function(require,module,exports){
+},{}],51:[function(require,module,exports){
var Node = require("./node"),
contexts = require("../contexts");
@@ -5249,7 +5282,7 @@ DetachedRuleset.prototype.callEval = function (context) {
};
module.exports = DetachedRuleset;
-},{"../contexts":8,"./node":64}],50:[function(require,module,exports){
+},{"../contexts":10,"./node":66}],52:[function(require,module,exports){
var Node = require("./node"),
unitConversions = require("../data/unit-conversions"),
Unit = require("./unit"),
@@ -5406,7 +5439,7 @@ Dimension.prototype.convertTo = function (conversions) {
};
module.exports = Dimension;
-},{"../data/unit-conversions":11,"./color":44,"./node":64,"./unit":73}],51:[function(require,module,exports){
+},{"../data/unit-conversions":13,"./color":46,"./node":66,"./unit":75}],53:[function(require,module,exports){
var Node = require("./node"),
Ruleset = require("./ruleset");
@@ -5512,7 +5545,7 @@ Directive.prototype.outputRuleset = function (context, output, rules) {
};
module.exports = Directive;
-},{"./node":64,"./ruleset":70}],52:[function(require,module,exports){
+},{"./node":66,"./ruleset":72}],54:[function(require,module,exports){
var Node = require("./node"),
Paren = require("./paren"),
Combinator = require("./combinator");
@@ -5567,7 +5600,7 @@ Element.prototype.toCSS = function (context) {
};
module.exports = Element;
-},{"./combinator":45,"./node":64,"./paren":66}],53:[function(require,module,exports){
+},{"./combinator":47,"./node":66,"./paren":68}],55:[function(require,module,exports){
var Node = require("./node"),
Paren = require("./paren"),
Comment = require("./comment");
@@ -5625,7 +5658,7 @@ Expression.prototype.throwAwayComments = function () {
};
module.exports = Expression;
-},{"./comment":46,"./node":64,"./paren":66}],54:[function(require,module,exports){
+},{"./comment":48,"./node":66,"./paren":68}],56:[function(require,module,exports){
var Node = require("./node");
var Extend = function Extend(selector, option, index) {
@@ -5678,7 +5711,7 @@ Extend.prototype.findSelfSelectors = function (selectors) {
};
module.exports = Extend;
-},{"./node":64}],55:[function(require,module,exports){
+},{"./node":66}],57:[function(require,module,exports){
var Node = require("./node"),
Media = require("./media"),
URL = require("./url"),
@@ -5820,7 +5853,7 @@ Import.prototype.eval = function (context) {
};
module.exports = Import;
-},{"./anonymous":40,"./media":60,"./node":64,"./quoted":67,"./ruleset":70,"./url":74}],56:[function(require,module,exports){
+},{"./anonymous":42,"./media":62,"./node":66,"./quoted":69,"./ruleset":72,"./url":76}],58:[function(require,module,exports){
var tree = {};
tree.Alpha = require('./alpha');
@@ -5862,7 +5895,7 @@ tree.RulesetCall = require('./ruleset-call');
module.exports = tree;
-},{"./alpha":39,"./anonymous":40,"./assignment":41,"./attribute":42,"./call":43,"./color":44,"./combinator":45,"./comment":46,"./condition":47,"./detached-ruleset":49,"./dimension":50,"./directive":51,"./element":52,"./expression":53,"./extend":54,"./import":55,"./javascript":57,"./keyword":59,"./media":60,"./mixin-call":61,"./mixin-definition":62,"./negative":63,"./operation":65,"./paren":66,"./quoted":67,"./rule":68,"./ruleset":70,"./ruleset-call":69,"./selector":71,"./unicode-descript [...]
+},{"./alpha":41,"./anonymous":42,"./assignment":43,"./attribute":44,"./call":45,"./color":46,"./combinator":47,"./comment":48,"./condition":49,"./detached-ruleset":51,"./dimension":52,"./directive":53,"./element":54,"./expression":55,"./extend":56,"./import":57,"./javascript":59,"./keyword":61,"./media":62,"./mixin-call":63,"./mixin-definition":64,"./negative":65,"./operation":67,"./paren":68,"./quoted":69,"./rule":70,"./ruleset":72,"./ruleset-call":71,"./selector":73,"./unicode-descript [...]
var JsEvalNode = require("./js-eval-node"),
Dimension = require("./dimension"),
Quoted = require("./quoted"),
@@ -5892,7 +5925,7 @@ JavaScript.prototype.eval = function(context) {
module.exports = JavaScript;
-},{"./anonymous":40,"./dimension":50,"./js-eval-node":58,"./quoted":67}],58:[function(require,module,exports){
+},{"./anonymous":42,"./dimension":52,"./js-eval-node":60,"./quoted":69}],60:[function(require,module,exports){
var Node = require("./node"),
Variable = require("./variable");
@@ -5955,7 +5988,7 @@ JsEvalNode.prototype.jsify = function (obj) {
module.exports = JsEvalNode;
-},{"./node":64,"./variable":76}],59:[function(require,module,exports){
+},{"./node":66,"./variable":78}],61:[function(require,module,exports){
var Node = require("./node");
var Keyword = function (value) { this.value = value; };
@@ -5971,7 +6004,7 @@ Keyword.False = new Keyword('false');
module.exports = Keyword;
-},{"./node":64}],60:[function(require,module,exports){
+},{"./node":66}],62:[function(require,module,exports){
var Ruleset = require("./ruleset"),
Value = require("./value"),
Element = require("./element"),
@@ -6134,7 +6167,7 @@ Media.prototype.bubbleSelectors = function (selectors) {
};
module.exports = Media;
-},{"./anonymous":40,"./directive":51,"./element":52,"./expression":53,"./ruleset":70,"./selector":71,"./value":75}],61:[function(require,module,exports){
+},{"./anonymous":42,"./directive":53,"./element":54,"./expression":55,"./ruleset":72,"./selector":73,"./value":77}],63:[function(require,module,exports){
var Node = require("./node"),
Selector = require("./selector"),
MixinDefinition = require("./mixin-definition"),
@@ -6306,7 +6339,7 @@ MixinCall.prototype.format = function (args) {
};
module.exports = MixinCall;
-},{"../functions/default":17,"./mixin-definition":62,"./node":64,"./selector":71}],62:[function(require,module,exports){
+},{"../functions/default":19,"./mixin-definition":64,"./node":66,"./selector":73}],64:[function(require,module,exports){
var Selector = require("./selector"),
Element = require("./element"),
Ruleset = require("./ruleset"),
@@ -6471,7 +6504,7 @@ Definition.prototype.matchArgs = function (args, context) {
};
module.exports = Definition;
-},{"../contexts":8,"./element":52,"./expression":53,"./rule":68,"./ruleset":70,"./selector":71}],63:[function(require,module,exports){
+},{"../contexts":10,"./element":54,"./expression":55,"./rule":70,"./ruleset":72,"./selector":73}],65:[function(require,module,exports){
var Node = require("./node"),
Operation = require("./operation"),
Dimension = require("./dimension");
@@ -6493,7 +6526,7 @@ Negative.prototype.eval = function (context) {
};
module.exports = Negative;
-},{"./dimension":50,"./node":64,"./operation":65}],64:[function(require,module,exports){
+},{"./dimension":52,"./node":66,"./operation":67}],66:[function(require,module,exports){
var Node = function() {
};
Node.prototype.toCSS = function (context) {
@@ -6569,7 +6602,7 @@ Node.numericCompare = function (a, b) {
};
module.exports = Node;
-},{}],65:[function(require,module,exports){
+},{}],67:[function(require,module,exports){
var Node = require("./node"),
Color = require("./color"),
Dimension = require("./dimension");
@@ -6619,7 +6652,7 @@ Operation.prototype.genCSS = function (context, output) {
module.exports = Operation;
-},{"./color":44,"./dimension":50,"./node":64}],66:[function(require,module,exports){
+},{"./color":46,"./dimension":52,"./node":66}],68:[function(require,module,exports){
var Node = require("./node");
var Paren = function (node) {
@@ -6637,7 +6670,7 @@ Paren.prototype.eval = function (context) {
};
module.exports = Paren;
-},{"./node":64}],67:[function(require,module,exports){
+},{"./node":66}],69:[function(require,module,exports){
var Node = require("./node"),
JsEvalNode = require("./js-eval-node"),
Variable = require("./variable");
@@ -6694,7 +6727,7 @@ Quoted.prototype.compare = function (other) {
};
module.exports = Quoted;
-},{"./js-eval-node":58,"./node":64,"./variable":76}],68:[function(require,module,exports){
+},{"./js-eval-node":60,"./node":66,"./variable":78}],70:[function(require,module,exports){
var Node = require("./node"),
Value = require("./value"),
Keyword = require("./keyword");
@@ -6786,7 +6819,7 @@ Rule.prototype.makeImportant = function () {
module.exports = Rule;
-},{"./keyword":59,"./node":64,"./value":75}],69:[function(require,module,exports){
+},{"./keyword":61,"./node":66,"./value":77}],71:[function(require,module,exports){
var Node = require("./node"),
Variable = require("./variable");
@@ -6801,7 +6834,7 @@ RulesetCall.prototype.eval = function (context) {
};
module.exports = RulesetCall;
-},{"./node":64,"./variable":76}],70:[function(require,module,exports){
+},{"./node":66,"./variable":78}],72:[function(require,module,exports){
var Node = require("./node"),
Rule = require("./rule"),
Selector = require("./selector"),
@@ -7404,7 +7437,7 @@ Ruleset.prototype.mergeElementsOnToSelectors = function(elements, selectors) {
};
module.exports = Ruleset;
-},{"../contexts":8,"../functions/default":17,"./debug-info":48,"./element":52,"./node":64,"./rule":68,"./selector":71}],71:[function(require,module,exports){
+},{"../contexts":10,"../functions/default":19,"./debug-info":50,"./element":54,"./node":66,"./rule":70,"./selector":73}],73:[function(require,module,exports){
var Node = require("./node");
var Selector = function (elements, extendList, condition, index, currentFileInfo, isReferenced) {
@@ -7514,7 +7547,7 @@ Selector.prototype.getIsOutput = function() {
};
module.exports = Selector;
-},{"./node":64}],72:[function(require,module,exports){
+},{"./node":66}],74:[function(require,module,exports){
var Node = require("./node");
var UnicodeDescriptor = function (value) {
@@ -7525,7 +7558,7 @@ UnicodeDescriptor.prototype.type = "UnicodeDescriptor";
module.exports = UnicodeDescriptor;
-},{"./node":64}],73:[function(require,module,exports){
+},{"./node":66}],75:[function(require,module,exports){
var Node = require("./node"),
unitConversions = require("../data/unit-conversions");
@@ -7653,7 +7686,7 @@ Unit.prototype.cancel = function () {
};
module.exports = Unit;
-},{"../data/unit-conversions":11,"./node":64}],74:[function(require,module,exports){
+},{"../data/unit-conversions":13,"./node":66}],76:[function(require,module,exports){
var Node = require("./node");
var URL = function (val, index, currentFileInfo, isEvald) {
@@ -7706,7 +7739,7 @@ URL.prototype.eval = function (context) {
};
module.exports = URL;
-},{"./node":64}],75:[function(require,module,exports){
+},{"./node":66}],77:[function(require,module,exports){
var Node = require("./node");
var Value = function (value) {
@@ -7742,7 +7775,7 @@ Value.prototype.genCSS = function (context, output) {
};
module.exports = Value;
-},{"./node":64}],76:[function(require,module,exports){
+},{"./node":66}],78:[function(require,module,exports){
var Node = require("./node");
var Variable = function (name, index, currentFileInfo) {
@@ -7793,7 +7826,7 @@ Variable.prototype.find = function (obj, fun) {
};
module.exports = Variable;
-},{"./node":64}],77:[function(require,module,exports){
+},{"./node":66}],79:[function(require,module,exports){
module.exports = {
getLocation: function(index, inputStream) {
var n = index + 1,
@@ -7815,7 +7848,7 @@ module.exports = {
}
};
-},{}],78:[function(require,module,exports){
+},{}],80:[function(require,module,exports){
var tree = require("../tree"),
Visitor = require("./visitor");
@@ -8235,7 +8268,7 @@ ProcessExtendsVisitor.prototype = {
module.exports = ProcessExtendsVisitor;
-},{"../tree":56,"./visitor":84}],79:[function(require,module,exports){
+},{"../tree":58,"./visitor":86}],81:[function(require,module,exports){
function ImportSequencer(onSequencerEmpty) {
this.imports = [];
this.variableImports = [];
@@ -8285,7 +8318,7 @@ ImportSequencer.prototype.tryRun = function() {
module.exports = ImportSequencer;
-},{}],80:[function(require,module,exports){
+},{}],82:[function(require,module,exports){
var contexts = require("../contexts"),
Visitor = require("./visitor"),
ImportSequencer = require("./import-sequencer");
@@ -8466,7 +8499,7 @@ ImportVisitor.prototype = {
};
module.exports = ImportVisitor;
-},{"../contexts":8,"./import-sequencer":79,"./visitor":84}],81:[function(require,module,exports){
+},{"../contexts":10,"./import-sequencer":81,"./visitor":86}],83:[function(require,module,exports){
var visitors = {
Visitor: require("./visitor"),
ImportVisitor: require('./import-visitor'),
@@ -8477,7 +8510,7 @@ var visitors = {
module.exports = visitors;
-},{"./extend-visitor":78,"./import-visitor":80,"./join-selector-visitor":82,"./to-css-visitor":83,"./visitor":84}],82:[function(require,module,exports){
+},{"./extend-visitor":80,"./import-visitor":82,"./join-selector-visitor":84,"./to-css-visitor":85,"./visitor":86}],84:[function(require,module,exports){
var Visitor = require("./visitor");
var JoinSelectorVisitor = function() {
@@ -8524,7 +8557,7 @@ JoinSelectorVisitor.prototype = {
module.exports = JoinSelectorVisitor;
-},{"./visitor":84}],83:[function(require,module,exports){
+},{"./visitor":86}],85:[function(require,module,exports){
var tree = require("../tree"),
Visitor = require("./visitor");
@@ -8541,7 +8574,7 @@ ToCSSVisitor.prototype = {
visitRule: function (ruleNode, visitArgs) {
if (ruleNode.variable) {
- return [];
+ return;
}
return ruleNode;
},
@@ -8550,16 +8583,14 @@ ToCSSVisitor.prototype = {
// mixin definitions do not get eval'd - this means they keep state
// so we have to clear that state here so it isn't used if toCSS is called twice
mixinNode.frames = [];
- return [];
},
visitExtend: function (extendNode, visitArgs) {
- return [];
},
visitComment: function (commentNode, visitArgs) {
if (commentNode.isSilent(this._context)) {
- return [];
+ return;
}
return commentNode;
},
@@ -8569,14 +8600,14 @@ ToCSSVisitor.prototype = {
visitArgs.visitDeeper = false;
if (!mediaNode.rules.length) {
- return [];
+ return;
}
return mediaNode;
},
visitDirective: function(directiveNode, visitArgs) {
if (directiveNode.currentFileInfo.reference && !directiveNode.isReferenced) {
- return [];
+ return;
}
if (directiveNode.name === "@charset") {
// Only output the debug info together with subsequent @charset definitions
@@ -8588,7 +8619,7 @@ ToCSSVisitor.prototype = {
comment.debugInfo = directiveNode.debugInfo;
return this._visitor.visit(comment);
}
- return [];
+ return;
}
this.charset = true;
}
@@ -8771,7 +8802,7 @@ ToCSSVisitor.prototype = {
module.exports = ToCSSVisitor;
-},{"../tree":56,"./visitor":84}],84:[function(require,module,exports){
+},{"../tree":58,"./visitor":86}],86:[function(require,module,exports){
var tree = require("../tree");
var _visitArgs = { visitDeeper: true },
@@ -8880,6 +8911,7 @@ Visitor.prototype = {
var out = [];
for (i = 0; i < cnt; i++) {
var evald = this.visit(nodes[i]);
+ if (evald === undefined) { continue; }
if (!evald.splice) {
out.push(evald);
} else if (evald.length) {
@@ -8898,6 +8930,9 @@ Visitor.prototype = {
for (i = 0, cnt = arr.length; i < cnt; i++) {
item = arr[i];
+ if (item === undefined) {
+ continue;
+ }
if (!item.splice) {
out.push(item);
continue;
@@ -8905,6 +8940,9 @@ Visitor.prototype = {
for (j = 0, nestedCnt = item.length; j < nestedCnt; j++) {
nestedItem = item[j];
+ if (nestedItem === undefined) {
+ continue;
+ }
if (!nestedItem.splice) {
out.push(nestedItem);
} else if (nestedItem.length) {
@@ -8918,7 +8956,7 @@ Visitor.prototype = {
};
module.exports = Visitor;
-},{"../tree":56}],85:[function(require,module,exports){
+},{"../tree":58}],87:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
@@ -9006,7 +9044,7 @@ process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
-},{}],86:[function(require,module,exports){
+},{}],88:[function(require,module,exports){
'use strict';
var asap = require('asap')
@@ -9113,22 +9151,7 @@ function doResolve(fn, onFulfilled, onRejected) {
}
}
-},{"asap":90}],87:[function(require,module,exports){
-'use strict';
-
-var Promise = require('./core.js')
-var asap = require('asap')
-
-module.exports = Promise
-Promise.prototype.done = function (onFulfilled, onRejected) {
- var self = arguments.length ? this.then.apply(this, arguments) : this
- self.then(null, function (err) {
- asap(function () {
- throw err
- })
- })
-}
-},{"./core.js":86,"asap":90}],88:[function(require,module,exports){
+},{"asap":90}],89:[function(require,module,exports){
'use strict';
//This file contains the ES6 extensions to the core Promises/A+ API
@@ -9238,69 +9261,7 @@ Promise.prototype['catch'] = function (onRejected) {
return this.then(null, onRejected);
}
-},{"./core.js":86,"asap":90}],89:[function(require,module,exports){
-'use strict';
-
-//This file contains then/promise specific extensions that are only useful for node.js interop
-
-var Promise = require('./core.js')
-var asap = require('asap')
-
-module.exports = Promise
-
-/* Static Functions */
-
-Promise.denodeify = function (fn, argumentCount) {
- argumentCount = argumentCount || Infinity
- return function () {
- var self = this
- var args = Array.prototype.slice.call(arguments)
- return new Promise(function (resolve, reject) {
- while (args.length && args.length > argumentCount) {
- args.pop()
- }
- args.push(function (err, res) {
- if (err) reject(err)
- else resolve(res)
- })
- fn.apply(self, args)
- })
- }
-}
-Promise.nodeify = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments)
- var callback = typeof args[args.length - 1] === 'function' ? args.pop() : null
- var ctx = this
- try {
- return fn.apply(this, arguments).nodeify(callback, ctx)
- } catch (ex) {
- if (callback === null || typeof callback == 'undefined') {
- return new Promise(function (resolve, reject) { reject(ex) })
- } else {
- asap(function () {
- callback.call(ctx, ex)
- })
- }
- }
- }
-}
-
-Promise.prototype.nodeify = function (callback, ctx) {
- if (typeof callback != 'function') return this
-
- this.then(function (value) {
- asap(function () {
- callback.call(ctx, null, value)
- })
- }, function (err) {
- asap(function () {
- callback.call(ctx, err)
- })
- })
-}
-
-},{"./core.js":86,"asap":90}],90:[function(require,module,exports){
+},{"./core.js":88,"asap":90}],90:[function(require,module,exports){
(function (process){
// Use the fastest possible means to execute a task in a future turn
@@ -9417,7 +9378,7 @@ module.exports = asap;
}).call(this,require('_process'))
-},{"_process":85}],91:[function(require,module,exports){
+},{"_process":87}],91:[function(require,module,exports){
// should work in any browser without browserify
if (typeof Promise.prototype.done !== 'function') {
@@ -9430,7 +9391,7 @@ if (typeof Promise.prototype.done !== 'function') {
})
}
}
-},{}],92:[function(require,module,exports){
+},{}],"promise/polyfill.js":[function(require,module,exports){
// not "use strict" so we can declare global "Promise"
var asap = require('asap');
@@ -9442,11 +9403,5 @@ if (typeof Promise === 'undefined') {
require('./polyfill-done.js');
-},{"./lib/core.js":86,"./lib/es6-extensions.js":88,"./polyfill-done.js":91,"asap":90}],"promise":[function(require,module,exports){
-'use strict';
-
-module.exports = require('./lib/core.js')
-require('./lib/done.js')
-require('./lib/es6-extensions.js')
-require('./lib/node-extensions.js')
-},{"./lib/core.js":86,"./lib/done.js":87,"./lib/es6-extensions.js":88,"./lib/node-extensions.js":89}]},{},[5]);
+},{"./lib/core.js":88,"./lib/es6-extensions.js":89,"./polyfill-done.js":91,"asap":90}]},{},[2])(2)
+});
\ No newline at end of file
diff --git a/dist/less.min.js b/dist/less.min.js
index 9598944..3ebbe52 100644
--- a/dist/less.min.js
+++ b/dist/less.min.js
@@ -1,5 +1,5 @@
/*!
- * Less - Leaner CSS v2.0.0-b2
+ * Less - Leaner CSS v2.0.0-b3
* http://lesscss.org
*
* Copyright (c) 2009-2014, Alexis Sellier <self at cloudhead.net>
@@ -10,8 +10,8 @@
/** * @license Apache v2
*/
-require=function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){var c=a("./utils");b.exports= [...]
-};return b.prototype.push=function(b,e,f,g,h){var i=this;this.queue.push(b);var j=function(a,c,d){i.queue.splice(i.queue.indexOf(b),1);var e=d===i.rootFilename;i.files[d]=c,a&&!i.error&&(i.error=a),h(a,c,e,d)},k={relativeUrls:this.context.relativeUrls,entryPath:f.entryPath,rootpath:f.rootpath,rootFilename:f.rootFilename},l=a.getFileManager(b,f.currentDirectory,this.context,a);return l?(e&&(b=l.tryAppendLessExtension(b)),void l.loadFile(b,f.currentDirectory,this.context,a).then(function(a [...]
-b.add(")")},b.exports=e},{"../functions/function-caller":18,"./node":64}],44:[function(a,b){function c(a,b){return Math.min(Math.max(a,0),b)}function d(a){return"#"+a.map(function(a){return a=c(Math.round(a),255),(16>a?"0":"")+a.toString(16)}).join("")}var e=a("./node"),f=a("../data/colors"),g=function(a,b){this.rgb=Array.isArray(a)?a:6==a.length?a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha="number"==typeof b?b: [...]
-h.reset()}else i=!0;var k,l,m=this.rules?this.rules.slice(0):null,n=new j(b,m,this.strictImports);n.originalRuleset=this,n.root=this.root,n.firstRoot=this.firstRoot,n.allowImports=this.allowImports,this.debugInfo&&(n.debugInfo=this.debugInfo),i||(m.length=0);var o=a.frames;o.unshift(n);var p=a.selectors;p||(a.selectors=p=[]),p.unshift(this.selectors),(n.root||n.allowImports||!n.strictImports)&&n.evalImports(a);var q=n.rules,r=q?q.length:0;for(f=0;r>f;f++)q[f].evalFirst&&(q[f]=q[f].eval(a [...]
-a.then(null,function(a){setTimeout(function(){throw a},0)})})},{}],92:[function(a){a("asap");"undefined"==typeof Promise&&(Promise=a("./lib/core.js"),a("./lib/es6-extensions.js")),a("./polyfill-done.js")},{"./lib/core.js":86,"./lib/es6-extensions.js":88,"./polyfill-done.js":91,asap:90}],promise:[function(a,b){"use strict";b.exports=a("./lib/core.js"),a("./lib/done.js"),a("./lib/es6-extensions.js"),a("./lib/node-extensions.js")},{"./lib/core.js":86,"./lib/done.js":87,"./lib/es6-extensions [...]
\ No newline at end of file
+!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.less=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.co [...]
+return d=d?d instanceof b?d.value:d.toCSS():"",new c(a.value,d)},"get-unit":function(a){return new f(a.unit)},extract:function(a,b){return b=b.value-1,Array.isArray(a.value)?a.value[b]:Array(a)[b]},length:function(a){var b=Array.isArray(a.value)?a.value.length:1;return new c(b)}})},{"../tree/anonymous":42,"../tree/color":46,"../tree/dimension":52,"../tree/keyword":61,"../tree/operation":67,"../tree/quoted":69,"../tree/url":76,"./function-registry":21}],28:[function(a,b){var c=a("./contex [...]
+};e.prototype=new c,e.prototype.type="Call",e.prototype.accept=function(a){this.args&&(this.args=a.visitArray(this.args))},e.prototype.eval=function(a){var b,c=this.args.map(function(b){return b.eval(a)}),f=new d(this.name,a,this.index,this.currentFileInfo);if(f.isValid())try{if(b=f.call(c),null!=b)return b}catch(g){throw{type:g.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(g.message?": "+g.message:""),index:this.index,filename:this.currentFileInfo.filename}}return [...]
+return b.callEval(a)},b.exports=e},{"./node":66,"./variable":78}],72:[function(a,b){var c=a("./node"),d=a("./rule"),e=a("./selector"),f=a("./element"),g=a("../contexts"),h=a("../functions/default"),i=a("./debug-info"),j=function(a,b,c){this.selectors=a,this.rules=b,this._lookups={},this.strictImports=c};j.prototype=new c,j.prototype.type="Ruleset",j.prototype.isRuleset=!0,j.prototype.isRulesetLike=!0,j.prototype.accept=function(a){this.paths?a.visitArray(this.paths,!0):this.selectors&&(t [...]
+a.then(null,function(a){setTimeout(function(){throw a},0)})})},{}],"promise/polyfill.js":[function(a){a("asap");"undefined"==typeof Promise&&(Promise=a("./lib/core.js"),a("./lib/es6-extensions.js")),a("./polyfill-done.js")},{"./lib/core.js":88,"./lib/es6-extensions.js":89,"./polyfill-done.js":91,asap:90}]},{},[2])(2)});
\ No newline at end of file
diff --git a/package.json b/package.json
index 52216a6..c2d194d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "less",
- "version": "2.0.0-b2",
+ "version": "2.0.0-b3",
"description": "Leaner CSS",
"homepage": "http://lesscss.org",
"author": {
@@ -42,7 +42,7 @@
"optionalDependencies": {
"graceful-fs": "~3.0.4",
"mime": "~1.2.11",
- "request": "~2.46.0",
+ "request": "~2.47.0",
"mkdirp": "~0.5.0",
"source-map": "0.1.x",
"promise": "~6.0.1"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git
More information about the Pkg-javascript-commits
mailing list