less-loader 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/shelf/imports_fallback_https___github_com_webpack_less_loader_issues_74/shelved.patch +27 -0
- package/.idea/shelf/imports_fallback_https___github_com_webpack_less_loader_issues_74.xml +4 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/workspace.xml +386 -528
- package/CHANGELOG.md +5 -0
- package/index.js +3 -13
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
---------
|
|
3
3
|
|
|
4
|
+
### 2.2.3
|
|
5
|
+
|
|
6
|
+
- Fix missing path information in source map [#73](https://github.com/webpack/less-loader/pull/73)
|
|
7
|
+
- Add deprecation warning [#84](https://github.com/webpack/less-loader/issues/84)
|
|
8
|
+
|
|
4
9
|
### 2.2.2
|
|
5
10
|
|
|
6
11
|
- Fix issues with synchronous less functions like `data-uri()`, `image-size()`, `image-width()`, `image-height()` [#31](https://github.com/webpack/less-loader/issues/31) [#38](https://github.com/webpack/less-loader/issues/38) [#43](https://github.com/webpack/less-loader/issues/43) [#58](https://github.com/webpack/less-loader/pull/58)
|
package/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var less = require("less");
|
|
|
9
9
|
var fs = require("fs");
|
|
10
10
|
var loaderUtils = require("loader-utils");
|
|
11
11
|
var path = require("path");
|
|
12
|
+
var util = require("util");
|
|
12
13
|
|
|
13
14
|
var trailingSlash = /[\\\/]$/;
|
|
14
15
|
|
|
@@ -59,7 +60,6 @@ module.exports = function(source) {
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
less.render(source, config, function(e, result) {
|
|
62
|
-
var parsedMap;
|
|
63
63
|
var cb = finalCb;
|
|
64
64
|
// Less is giving us double callbacks sometimes :(
|
|
65
65
|
// Thus we need to mark the callback as "has been called"
|
|
@@ -67,16 +67,6 @@ module.exports = function(source) {
|
|
|
67
67
|
finalCb = null;
|
|
68
68
|
if(e) return cb(formatLessRenderError(e));
|
|
69
69
|
|
|
70
|
-
if (result.map) {
|
|
71
|
-
parsedMap = JSON.parse(result.map);
|
|
72
|
-
|
|
73
|
-
parsedMap.sources = parsedMap.sources.map(function(file) {
|
|
74
|
-
return path.basename(file);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
result.map = JSON.stringify(parsedMap);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
70
|
cb(null, result.css, result.map);
|
|
81
71
|
});
|
|
82
72
|
};
|
|
@@ -138,7 +128,7 @@ function getWebpackFileManager(less, loaderContext, query, isSync) {
|
|
|
138
128
|
});
|
|
139
129
|
};
|
|
140
130
|
|
|
141
|
-
WebpackFileManager.prototype.loadFileSync = function(filename, currentDirectory, options, environment) {
|
|
131
|
+
WebpackFileManager.prototype.loadFileSync = util.deprecate(function(filename, currentDirectory, options, environment) {
|
|
142
132
|
var moduleRequest = loaderUtils.urlToRequest(filename, query.root);
|
|
143
133
|
// Less is giving us trailing slashes, but the context should have no trailing slash
|
|
144
134
|
var context = currentDirectory.replace(trailingSlash, "");
|
|
@@ -152,7 +142,7 @@ function getWebpackFileManager(less, loaderContext, query, isSync) {
|
|
|
152
142
|
contents: data,
|
|
153
143
|
filename: filename
|
|
154
144
|
};
|
|
155
|
-
};
|
|
145
|
+
}, "We are planing to remove enhanced-require support with the next major release of the less-loader: https://github.com/webpack/less-loader/issues/84");
|
|
156
146
|
|
|
157
147
|
return WebpackFileManager;
|
|
158
148
|
}
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "less-loader",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"author": "Tobias Koppers @sokra",
|
|
5
5
|
"description": "less loader module for webpack",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "
|
|
7
|
+
"test": "node --no-deprecation node_modules/.bin/_mocha -R spec",
|
|
8
8
|
"test-source-map": "webpack --config test/sourceMap/webpack.config.js && open ./test/sourceMap/index.html"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
11
|
"less": "^2.3.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"css-loader": "^0.
|
|
14
|
+
"css-loader": "^0.23.1",
|
|
15
15
|
"enhanced-require": "^0.5.0-beta6",
|
|
16
|
-
"extract-text-webpack-plugin": "^0.
|
|
17
|
-
"less": "^2.
|
|
18
|
-
"mocha": "^2.
|
|
16
|
+
"extract-text-webpack-plugin": "^1.0.1",
|
|
17
|
+
"less": "^2.6.1",
|
|
18
|
+
"mocha": "^2.4.5",
|
|
19
19
|
"raw-loader": "^0.5.1",
|
|
20
|
-
"should": "^
|
|
21
|
-
"webpack": "^1.
|
|
20
|
+
"should": "^8.3.0",
|
|
21
|
+
"webpack": "^1.12.14"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|