less-loader 7.0.1 → 7.0.2
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/CHANGELOG.md +6 -0
- package/README.md +0 -58
- package/dist/index.js +2 -2
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [7.0.2](https://github.com/webpack-contrib/less-loader/compare/v7.0.1...v7.0.2) (2020-10-09)
|
|
6
|
+
|
|
7
|
+
### Chore
|
|
8
|
+
|
|
9
|
+
* update `schema-utils`
|
|
10
|
+
|
|
5
11
|
### [7.0.1](https://github.com/webpack-contrib/less-loader/compare/v7.0.0...v7.0.1) (2020-09-03)
|
|
6
12
|
|
|
7
13
|
|
package/README.md
CHANGED
|
@@ -203,64 +203,6 @@ module.exports = {
|
|
|
203
203
|
};
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
#### `String`
|
|
207
|
-
|
|
208
|
-
```js
|
|
209
|
-
module.exports = {
|
|
210
|
-
module: {
|
|
211
|
-
rules: [
|
|
212
|
-
{
|
|
213
|
-
test: /\.less$/,
|
|
214
|
-
use: [
|
|
215
|
-
'style-loader',
|
|
216
|
-
'css-loader',
|
|
217
|
-
{
|
|
218
|
-
loader: 'less-loader',
|
|
219
|
-
options: {
|
|
220
|
-
appendData: `@env: ${process.env.NODE_ENV};`,
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
},
|
|
225
|
-
],
|
|
226
|
-
},
|
|
227
|
-
};
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
#### `Function`
|
|
231
|
-
|
|
232
|
-
```js
|
|
233
|
-
module.exports = {
|
|
234
|
-
module: {
|
|
235
|
-
rules: [
|
|
236
|
-
{
|
|
237
|
-
test: /\.less$/,
|
|
238
|
-
use: [
|
|
239
|
-
'style-loader',
|
|
240
|
-
'css-loader',
|
|
241
|
-
{
|
|
242
|
-
loader: 'less-loader',
|
|
243
|
-
options: {
|
|
244
|
-
appendData: (loaderContext) => {
|
|
245
|
-
// More information about available properties https://webpack.js.org/api/loaders/
|
|
246
|
-
const { resourcePath, rootContext } = loaderContext;
|
|
247
|
-
const relativePath = path.relative(rootContext, resourcePath);
|
|
248
|
-
|
|
249
|
-
if (relativePath === 'styles/foo.less') {
|
|
250
|
-
return '@value: 100px;';
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return '@value: 200px;';
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
},
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
|
-
```
|
|
263
|
-
|
|
264
206
|
### `sourceMap`
|
|
265
207
|
|
|
266
208
|
Type: `Boolean`
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var _less = _interopRequireDefault(require("less"));
|
|
|
11
11
|
|
|
12
12
|
var _loaderUtils = require("loader-utils");
|
|
13
13
|
|
|
14
|
-
var _schemaUtils =
|
|
14
|
+
var _schemaUtils = require("schema-utils");
|
|
15
15
|
|
|
16
16
|
var _options = _interopRequireDefault(require("./options.json"));
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
23
|
|
|
24
24
|
async function lessLoader(source) {
|
|
25
25
|
const options = (0, _loaderUtils.getOptions)(this);
|
|
26
|
-
(0, _schemaUtils.
|
|
26
|
+
(0, _schemaUtils.validate)(_options.default, options, {
|
|
27
27
|
name: 'Less Loader',
|
|
28
28
|
baseDataPath: 'options'
|
|
29
29
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "less-loader",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "A Less loader for webpack. Compiles Less to CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "webpack-contrib/less-loader",
|
|
@@ -42,37 +42,37 @@
|
|
|
42
42
|
"webpack": "^4.0.0 || ^5.0.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"klona": "^2.0.
|
|
45
|
+
"klona": "^2.0.4",
|
|
46
46
|
"loader-utils": "^2.0.0",
|
|
47
|
-
"schema-utils": "^
|
|
47
|
+
"schema-utils": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@babel/cli": "^7.11.
|
|
51
|
-
"@babel/core": "^7.11.
|
|
50
|
+
"@babel/cli": "^7.11.6",
|
|
51
|
+
"@babel/core": "^7.11.6",
|
|
52
52
|
"@babel/preset-env": "^7.11.5",
|
|
53
|
-
"@commitlint/cli": "^
|
|
54
|
-
"@commitlint/config-conventional": "^
|
|
53
|
+
"@commitlint/cli": "^11.0.0",
|
|
54
|
+
"@commitlint/config-conventional": "^11.0.0",
|
|
55
55
|
"@webpack-contrib/defaults": "^6.3.0",
|
|
56
56
|
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
|
|
57
|
-
"babel-jest": "^26.
|
|
57
|
+
"babel-jest": "^26.5.2",
|
|
58
58
|
"cross-env": "^7.0.2",
|
|
59
|
-
"del": "^
|
|
59
|
+
"del": "^6.0.0",
|
|
60
60
|
"del-cli": "^3.0.1",
|
|
61
|
-
"eslint": "^7.
|
|
62
|
-
"eslint-config-prettier": "^6.
|
|
63
|
-
"eslint-plugin-import": "^2.22.
|
|
61
|
+
"eslint": "^7.10.0",
|
|
62
|
+
"eslint-config-prettier": "^6.12.0",
|
|
63
|
+
"eslint-plugin-import": "^2.22.1",
|
|
64
64
|
"eslint-plugin-prettier": "^3.1.4",
|
|
65
|
-
"husky": "^4.
|
|
65
|
+
"husky": "^4.3.0",
|
|
66
66
|
"inspect-loader": "^1.0.0",
|
|
67
|
-
"jest": "^26.
|
|
67
|
+
"jest": "^26.5.2",
|
|
68
68
|
"less": "^3.12.2",
|
|
69
|
-
"lint-staged": "^10.
|
|
69
|
+
"lint-staged": "^10.4.0",
|
|
70
70
|
"memfs": "^3.2.0",
|
|
71
71
|
"npm-run-all": "^4.1.5",
|
|
72
|
-
"prettier": "^2.1.
|
|
72
|
+
"prettier": "^2.1.2",
|
|
73
73
|
"standard-version": "^9.0.0",
|
|
74
74
|
"strip-ansi": "^6.0.0",
|
|
75
|
-
"webpack": "^4.44.
|
|
75
|
+
"webpack": "^4.44.2"
|
|
76
76
|
},
|
|
77
77
|
"keywords": [
|
|
78
78
|
"webpack",
|