less 5.0.0-alpha.1 → 5.0.0-alpha.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/bin/lessc +13 -1
- package/dist/less-browser-dev.js +2544 -0
- package/dist/less-node.cjs +96 -77
- package/lib/browser-dev.js +86 -0
- package/lib/lessc-helper.js +2 -0
- package/lib/options.js +20 -2
- package/package.json +11 -10
package/bin/lessc
CHANGED
|
@@ -38,7 +38,6 @@ const unsupportedOptions = new Map([
|
|
|
38
38
|
['--modify-var', 'modify-var injection is not supported'],
|
|
39
39
|
['--js', 'JavaScript evaluation is not supported'],
|
|
40
40
|
['--no-js', 'JavaScript evaluation flags are not supported'],
|
|
41
|
-
['--strict-units', 'strict unit mode is not supported'],
|
|
42
41
|
]);
|
|
43
42
|
|
|
44
43
|
function stripTerminalFormatting(value) {
|
|
@@ -141,6 +140,19 @@ function parseArgs() {
|
|
|
141
140
|
options.collapseNesting = true;
|
|
142
141
|
continue;
|
|
143
142
|
}
|
|
143
|
+
// Deprecated 4.x spellings (--strict-units, --strict-units=on|off, -su=on|off)
|
|
144
|
+
// set the deprecated `strictUnits` boolean; `createLessOptions` maps it to
|
|
145
|
+
// `unitMode` and warns during compile, after the logger listener is attached.
|
|
146
|
+
const strictUnitsMatch = arg.match(/^(?:--strict-units|-su)(?:=(on|off))?$/);
|
|
147
|
+
if (strictUnitsMatch) {
|
|
148
|
+
options.strictUnits = strictUnitsMatch[1] !== 'off';
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const unitModeMatch = arg.match(/^--unit-mode=(.+)$/);
|
|
152
|
+
if (unitModeMatch) {
|
|
153
|
+
options.unitMode = unitModeMatch[1];
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
144
156
|
const optionName = arg.includes('=') ? arg.slice(0, arg.indexOf('=')) : arg;
|
|
145
157
|
if (unsupportedOptions.has(optionName)) {
|
|
146
158
|
failUnsupportedOption(optionName, unsupportedOptions.get(optionName));
|