Skip to content

Commit

Permalink
2.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeapage committed Dec 20, 2014
1 parent 94a6501 commit 97b06ba
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 28 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
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
Expand Down
2 changes: 1 addition & 1 deletion bower.json
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": [
"**/.*",
Expand Down
50 changes: 31 additions & 19 deletions dist/less.js
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 <self@cloudhead.net>
Expand Down Expand Up @@ -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(_) {}
}
}
}
Expand Down Expand Up @@ -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 || {};
Expand All @@ -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());
Expand All @@ -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");

Expand Down Expand Up @@ -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 = '';
Expand All @@ -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);

Expand Down Expand Up @@ -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")),
Expand Down
12 changes: 6 additions & 6 deletions dist/less.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/less/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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")),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "less",
"version": "2.1.1",
"version": "2.1.2",
"description": "Leaner CSS",
"homepage": "http://lesscss.org",
"author": {
Expand Down

0 comments on commit 97b06ba

Please sign in to comment.