-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
47 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# 2.1.2 | ||
|
||
2014-12-20 | ||
|
||
- Fix for use with requirejs | ||
- Fixes for data-uri function | ||
|
||
# 2.1.1 | ||
|
||
2014-11-27 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "less", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"main": "dist/less.js", | ||
"ignore": [ | ||
"**/.*", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* Less - Leaner CSS v2.1.1 | ||
* Less - Leaner CSS v2.1.2 | ||
* http://lesscss.org | ||
* | ||
* Copyright (c) 2009-2014, Alexis Sellier <[email protected]> | ||
|
@@ -794,7 +794,10 @@ module.exports = { | |
if (opt === "env" || opt === "dumpLineNumbers" || opt === "rootpath" || opt === "errorReporting") { | ||
options[opt] = tag.dataset[opt]; | ||
} else { | ||
options[opt] = JSON.parse(tag.dataset[opt]); | ||
try { | ||
options[opt] = JSON.parse(tag.dataset[opt]); | ||
} | ||
catch(_) {} | ||
} | ||
} | ||
} | ||
|
@@ -1214,6 +1217,7 @@ abstractFileManager.prototype.extractUrlParts = function extractUrlParts(url, ba | |
module.exports = abstractFileManager; | ||
|
||
},{}],15:[function(require,module,exports){ | ||
var logger = require("../logger"); | ||
var environment = function(externalEnvironment, fileManagers) { | ||
this.fileManagers = fileManagers || []; | ||
externalEnvironment = externalEnvironment || {}; | ||
|
@@ -1234,6 +1238,14 @@ var environment = function(externalEnvironment, fileManagers) { | |
}; | ||
|
||
environment.prototype.getFileManager = function (filename, currentDirectory, options, environment, isSync) { | ||
|
||
if (!filename) { | ||
logger.warn("getFileManager called with no filename.. Please report this issue. continuing."); | ||
} | ||
if (currentDirectory == null) { | ||
logger.warn("getFileManager called with null directory.. Please report this issue. continuing."); | ||
} | ||
|
||
var fileManagers = this.fileManagers; | ||
if (options.pluginManager) { | ||
fileManagers = [].concat(fileManagers).concat(options.pluginManager.getFileManagers()); | ||
|
@@ -1257,7 +1269,7 @@ environment.prototype.clearFileManagers = function () { | |
|
||
module.exports = environment; | ||
|
||
},{}],16:[function(require,module,exports){ | ||
},{"../logger":31}],16:[function(require,module,exports){ | ||
var Color = require("../tree/color"), | ||
functionRegistry = require("./function-registry"); | ||
|
||
|
@@ -1624,20 +1636,15 @@ module.exports = function(environment) { | |
|
||
functionRegistry.add("data-uri", function(mimetypeNode, filePathNode) { | ||
|
||
var mimetype = mimetypeNode.value; | ||
var filePath = (filePathNode && filePathNode.value); | ||
|
||
var fileManager = environment.getFileManager(filePath, this.context.currentFileInfo, this.context, environment, true); | ||
|
||
if (!fileManager) { | ||
return fallback(this, filePathNode || mimetypeNode); | ||
if (!filePathNode) { | ||
filePathNode = mimetypeNode; | ||
mimetypeNode = null; | ||
} | ||
|
||
var useBase64 = false; | ||
|
||
if (arguments.length < 2) { | ||
filePath = mimetype; | ||
} | ||
var mimetype = mimetypeNode && mimetypeNode.value; | ||
var filePath = filePathNode.value; | ||
var currentDirectory = filePathNode.currentFileInfo.relativeUrls ? | ||
filePathNode.currentFileInfo.currentDirectory : filePathNode.currentFileInfo.entryPath; | ||
|
||
var fragmentStart = filePath.indexOf('#'); | ||
var fragment = ''; | ||
|
@@ -1646,11 +1653,16 @@ module.exports = function(environment) { | |
filePath = filePath.slice(0, fragmentStart); | ||
} | ||
|
||
var currentDirectory = this.currentFileInfo.relativeUrls ? | ||
this.currentFileInfo.currentDirectory : this.currentFileInfo.entryPath; | ||
var fileManager = environment.getFileManager(filePath, currentDirectory, this.context, environment, true); | ||
|
||
if (!fileManager) { | ||
return fallback(this, filePathNode); | ||
} | ||
|
||
var useBase64 = false; | ||
|
||
// detect the mimetype if not given | ||
if (arguments.length < 2) { | ||
if (!mimetypeNode) { | ||
|
||
mimetype = environment.mimeLookup(filePath); | ||
|
||
|
@@ -2222,7 +2234,7 @@ module.exports = function(environment, fileManagers) { | |
var SourceMapOutput, SourceMapBuilder, ParseTree, ImportManager, Environment; | ||
|
||
var less = { | ||
version: [2, 1, 1], | ||
version: [2, 1, 2], | ||
data: require('./data'), | ||
tree: require('./tree'), | ||
Environment: (Environment = require("./environment/environment")), | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters