Skip to content

Commit

Permalink
v4.0.0 (#3573)
Browse files Browse the repository at this point in the history
* Remove math=strict-legacy, set default=parens-division
* Support for comma-less color functions
* Require parens after mixin call
* Output invalid JS functions in CSS
* Escape parens and revert pass-through function errors
* Remove ieCompat option
* Remove non-performant class pattern
* Add isdefined() function
  • Loading branch information
matthew-dean committed Dec 18, 2020
1 parent 283b1b4 commit dc3a310
Show file tree
Hide file tree
Showing 153 changed files with 25,660 additions and 35,255 deletions.
10 changes: 9 additions & 1 deletion .vscode/launch.json
Expand Up @@ -3,14 +3,22 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Less test",
"program": "${workspaceFolder}/packages/less/test/index.js",
"cwd": "${workspaceFolder}/packages/less",
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Benchmark test",
"program": "${workspaceFolder}/packages/less/benchmark/index.js",
"cwd": "${workspaceFolder}/packages/less",
"console": "integratedTerminal"
}
]
}
22,309 changes: 11,153 additions & 11,156 deletions dist/less.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/less.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/less.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -3,5 +3,5 @@
"packages/*"
],
"npmClient": "npm",
"version": "3.13.0"
"version": "4.0.0"
}
2 changes: 1 addition & 1 deletion packages/less/Gruntfile.js
Expand Up @@ -283,7 +283,7 @@ module.exports = function(grunt) {
eslint: {
target: [
"test/**/*.js",
"lib/less*/**/*.js",
"src/less*/**/*.js",
"!test/less/errors/plugin/plugin-error.js"
],
options: {
Expand Down
17 changes: 14 additions & 3 deletions packages/less/bin/lessc
Expand Up @@ -554,16 +554,27 @@ function processPluginQueue() {

if (checkArgFunc(arg, match[2])) {
if (checkBooleanArg(match[2])) {
options.math = Constants.Math.STRICT_LEGACY;
options.math = Constants.Math.PARENS;
}
}

break;

case 'm':
case 'math':
if (checkArgFunc(arg, match[2])) {
options.math = match[2];
var m = match[2];
if (checkArgFunc(arg, m)) {
if (m === 'always') {
console.warn('--math=always is deprecated and will be removed in the future.');
options.math = Constants.Math.ALWAYS;
} else if (m === 'parens-division') {
options.math = Constants.Math.PARENS_DIVISION;
} else if (m === 'parens' || m === 'strict') {
options.math = Constants.Math.PARENS;
} else if (m === 'strict-legacy') {
console.warn('--math=strict-legacy has been removed. Defaulting to --math=strict');
options.math = Constants.Math.PARENS;
}
}

break;
Expand Down
2 changes: 2 additions & 0 deletions packages/less/build/rollup.js
@@ -1,6 +1,7 @@
const rollup = require('rollup');
const typescript = require('rollup-plugin-typescript2');
const commonjs = require('rollup-plugin-commonjs');
const json = require('@rollup/plugin-json');
const resolve = require('rollup-plugin-node-resolve');
const terser = require('rollup-plugin-terser').terser;
const banner = require('./banner');
Expand Down Expand Up @@ -28,6 +29,7 @@ async function buildBrowser() {
plugins: [
resolve(),
commonjs(),
json(),
typescript({
verbosity: 2,
tsconfigDefaults: {
Expand Down

0 comments on commit dc3a310

Please sign in to comment.