less 4.1.1 → 4.1.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/.eslintignore +2 -1
- package/.eslintrc.json +70 -2
- package/Gruntfile.js +6 -11
- package/dist/less.js +165 -102
- package/dist/less.min.js +2 -2
- package/dist/less.min.js.map +1 -1
- package/lib/less/functions/function-caller.js +5 -1
- package/lib/less/functions/function-caller.js.map +1 -1
- package/lib/less/functions/types.js +2 -1
- package/lib/less/functions/types.js.map +1 -1
- package/lib/less/tree/index.js +34 -7
- package/lib/less/tree/index.js.map +1 -1
- package/lib/less/tree/js-eval-node.js +4 -2
- package/lib/less/tree/js-eval-node.js.map +1 -1
- package/lib/less/tree/mixin-call.js +9 -3
- package/lib/less/tree/mixin-call.js.map +1 -1
- package/lib/less/tree/namespace-value.js +6 -2
- package/lib/less/tree/namespace-value.js.map +1 -1
- package/lib/less/tree/node.js +14 -7
- package/lib/less/tree/node.js.map +1 -1
- package/lib/less/tree/property.js +6 -2
- package/lib/less/tree/property.js.map +1 -1
- package/lib/less/tree/variable.js +6 -2
- package/lib/less/tree/variable.js.map +1 -1
- package/lib/less/visitors/to-css-visitor.js +4 -2
- package/lib/less/visitors/to-css-visitor.js.map +1 -1
- package/lib/less-node/url-file-manager.js +1 -1
- package/lib/less-node/url-file-manager.js.map +1 -1
- package/package.json +10 -9
- package/tsconfig.json +5 -0
package/.eslintignore
CHANGED
package/.eslintrc.json
CHANGED
|
@@ -1,3 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"parserOptions": {
|
|
4
|
+
"ecmaVersion": 2018,
|
|
5
|
+
"sourceType": "module"
|
|
6
|
+
},
|
|
7
|
+
"plugins": ["@typescript-eslint"],
|
|
8
|
+
"env": {
|
|
9
|
+
"browser": true,
|
|
10
|
+
"node": true
|
|
11
|
+
},
|
|
12
|
+
"globals": {},
|
|
13
|
+
"rules": {
|
|
14
|
+
"no-eval": 2,
|
|
15
|
+
"no-use-before-define": [
|
|
16
|
+
2,
|
|
17
|
+
{
|
|
18
|
+
"functions": false
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"no-undef": 0,
|
|
22
|
+
"no-unused-vars": 1,
|
|
23
|
+
"no-caller": 2,
|
|
24
|
+
"no-eq-null": 1,
|
|
25
|
+
"guard-for-in": 2,
|
|
26
|
+
"no-implicit-coercion": [
|
|
27
|
+
2,
|
|
28
|
+
{
|
|
29
|
+
"boolean": false,
|
|
30
|
+
"string": true,
|
|
31
|
+
"number": true
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"no-with": 2,
|
|
35
|
+
"no-mixed-spaces-and-tabs": 2,
|
|
36
|
+
"no-multiple-empty-lines": 2,
|
|
37
|
+
"dot-location": [2, "property"],
|
|
38
|
+
"operator-linebreak": [0, "after"],
|
|
39
|
+
"keyword-spacing": [2, {}],
|
|
40
|
+
"space-unary-ops": [
|
|
41
|
+
2,
|
|
42
|
+
{
|
|
43
|
+
"words": false,
|
|
44
|
+
"nonwords": false
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"no-spaced-func": 2,
|
|
48
|
+
"space-before-function-paren": [
|
|
49
|
+
1,
|
|
50
|
+
{
|
|
51
|
+
"anonymous": "ignore",
|
|
52
|
+
"named": "never"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"comma-dangle": [2, "never"],
|
|
56
|
+
"no-trailing-spaces": 0,
|
|
57
|
+
"max-len": [2, 160],
|
|
58
|
+
"comma-style": [2, "last"],
|
|
59
|
+
"curly": [2, "all"],
|
|
60
|
+
"space-infix-ops": 2,
|
|
61
|
+
"spaced-comment": 1,
|
|
62
|
+
"space-before-blocks": [2, "always"],
|
|
63
|
+
"indent": [
|
|
64
|
+
2,
|
|
65
|
+
4,
|
|
66
|
+
{
|
|
67
|
+
"SwitchCase": 1
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
package/Gruntfile.js
CHANGED
|
@@ -12,7 +12,6 @@ module.exports = function(grunt) {
|
|
|
12
12
|
// Report the elapsed execution time of tasks.
|
|
13
13
|
require("time-grunt")(grunt);
|
|
14
14
|
|
|
15
|
-
var COMPRESS_FOR_TESTS = false;
|
|
16
15
|
var git = require("git-rev");
|
|
17
16
|
|
|
18
17
|
// Sauce Labs browser
|
|
@@ -184,17 +183,11 @@ module.exports = function(grunt) {
|
|
|
184
183
|
// Make the SauceLabs jobs
|
|
185
184
|
["all"].concat(browserTests).map(makeJob);
|
|
186
185
|
|
|
187
|
-
var semver = require('semver');
|
|
188
186
|
var path = require('path');
|
|
189
187
|
|
|
190
188
|
// Handle async / await in Rollup build for tests
|
|
191
|
-
// Remove this when Node 6 is no longer supported for the build/test process
|
|
192
|
-
const nodeVersion = semver.major(process.versions.node);
|
|
193
189
|
const tsNodeRuntime = path.resolve(path.join('node_modules', '.bin', 'ts-node'));
|
|
194
|
-
|
|
195
|
-
if (nodeVersion < 8) {
|
|
196
|
-
scriptRuntime = tsNodeRuntime;
|
|
197
|
-
}
|
|
190
|
+
const crossEnv = path.resolve(path.join('node_modules', '.bin', 'cross-env'));
|
|
198
191
|
|
|
199
192
|
// Project configuration.
|
|
200
193
|
grunt.initConfig({
|
|
@@ -209,7 +202,7 @@ module.exports = function(grunt) {
|
|
|
209
202
|
build: {
|
|
210
203
|
command: [
|
|
211
204
|
/** Browser runtime */
|
|
212
|
-
|
|
205
|
+
"node build/rollup.js --dist",
|
|
213
206
|
/** Copy to repo root */
|
|
214
207
|
"npm run copy:root",
|
|
215
208
|
/** Node.js runtime */
|
|
@@ -219,17 +212,19 @@ module.exports = function(grunt) {
|
|
|
219
212
|
testbuild: {
|
|
220
213
|
command: [
|
|
221
214
|
"npm run build",
|
|
222
|
-
|
|
215
|
+
"node build/rollup.js --browser --out=./tmp/browser/less.min.js"
|
|
223
216
|
].join(" && ")
|
|
224
217
|
},
|
|
225
218
|
testcjs: {
|
|
226
219
|
command: "npm run build"
|
|
227
220
|
},
|
|
228
221
|
testbrowser: {
|
|
229
|
-
command:
|
|
222
|
+
command: "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
|
|
230
223
|
},
|
|
231
224
|
test: {
|
|
232
225
|
command: [
|
|
226
|
+
// https://github.com/TypeStrong/ts-node/issues/693#issuecomment-848907036
|
|
227
|
+
crossEnv + " TS_NODE_SCOPE=true",
|
|
233
228
|
tsNodeRuntime + " test/test-es6.ts",
|
|
234
229
|
"node test/index.js"
|
|
235
230
|
].join(' && ')
|