Skip to content

Commit 4f20273

Browse files
calvinjuarezmatthew-dean
authored andcommitted
Merge branch 'master' into feature/rewrite-urls (#3282)
* WIP - Added strictMath: 'division' option * Removes `less-rhino` (broken for a long time) - Fixes #3241 * Expressions require a delimiter of some kind in mixin args * Removes "double paren" issue for boolean / if function * WIP each() re-implementation * Allows plain conditions without parentheses * Added each() and tests * Added tests calling mixins from each() * Fixes #1880 - Adds two new math modes and deprecates strictMath * Allows named args for detached ruleset (anonymous mixin) * Makes sure this doesn't regress needing parens around mixin guard conditions * Remove javascriptEnabled from browser options check, add to defaults * Workaround weird Jasmine conversion of < to HTML entity * Removes remaining Rhino cruft * Remove rhino files from bower * Bump Jasmine version * Added .() example to each * v3.6.0 * Update CHANGELOG.md * add explicit nested anonymous mixin test * add explicit nested anonymous mixin test result * derp: align test with expected output * v3.7.0 (#3279) * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md
1 parent f0ab5be commit 4f20273

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2185
-1829
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ lessc text eol=lf
44
*.less text eol=lf
55
*.css text eol=lf
66
*.htm text eol=lf
7-
gradlew.bat text eol=crlf
87
*.html text eol=lf
98
*.jpg binary
109
*.png binary

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@ test/sourcemaps/*.css
2020
test/less-bom
2121

2222
# grunt
23-
.grunt
24-
25-
# gradle
26-
.gradle
27-
out
23+
.grunt

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ test/
66
# re-include test files as they can be useful for plugins that do testing
77
!test/*.js
88
tmp/
9-
gradle/

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1+
## 3.7.0
2+
3+
2018-07-11
4+
- New each() function! [See docs](http://lesscss.org/functions/#list-functions-each)
5+
- New math modes! Also [see docs](http://lesscss.org/usage/#less-options-math).
6+
- Bug fixes
7+
8+
## 3.6.0
9+
10+
2018-07-10
11+
- Allows plain conditions in `if(true, 1, 2)` (vs. `if((true), 1, 2)`)
12+
- Fixes svg-gradient() for Firefox
13+
- Adds more 3rd-party tests for fewer surprises when upgrading
14+
- Removes (broken) `less-rhino` implementation - use other Java ports
15+
116
## 3.5.3
217

318
2018-07-06
4-
- Reverts @media eval change
19+
- Reverts `@media` eval change
520
- Other bug fixes
621

722
## 3.5.0

Gruntfile.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ module.exports = function (grunt) {
158158
// Project configuration.
159159
grunt.initConfig({
160160

161-
// Metadata required for build.
162-
build: grunt.file.readYAML('build/build.yml'),
163161
pkg: grunt.file.readJSON('package.json'),
164162
meta: {
165163
copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>',
@@ -232,24 +230,6 @@ module.exports = function (grunt) {
232230
dist: {
233231
src: '<%= browserify.browser.dest %>',
234232
dest: 'dist/less.js'
235-
},
236-
// Rhino
237-
rhino: {
238-
options: {
239-
banner: '/* Less.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
240-
footer: '' // override task-level footer
241-
},
242-
src: ['<%= build.rhino %>'],
243-
dest: 'dist/less-rhino.js'
244-
},
245-
// lessc for Rhino
246-
rhinolessc: {
247-
options: {
248-
banner: '/* Less.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
249-
footer: '' // override task-level footer
250-
},
251-
src: ['<%= build.rhinolessc %>'],
252-
dest: 'dist/lessc-rhino.js'
253233
}
254234
},
255235

@@ -307,7 +287,8 @@ module.exports = function (grunt) {
307287
main: {
308288
// src is used to build list of less files to compile
309289
src: [
310-
'test/less/plugin.less',
290+
'test/less/*.less',
291+
'!test/less/plugin-preeval.less', // uses ES6 syntax
311292
// Don't test NPM import, obviously
312293
'!test/less/plugin-module.less',
313294
'!test/less/import-module.less',
@@ -491,13 +472,6 @@ module.exports = function (grunt) {
491472
'uglify:dist'
492473
]);
493474

494-
// Release Rhino Version (UNSUPPORTED)
495-
grunt.registerTask('rhino', [
496-
'browserify:rhino',
497-
'concat:rhino',
498-
'concat:rhinolessc'
499-
]);
500-
501475
// Create the browser version of less.js
502476
grunt.registerTask('browsertest-lessjs', [
503477
'browserify:browser',

bin/lessc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var path = require('path'),
44
fs = require('../lib/less-node/fs'),
55
os = require('os'),
66
utils = require('../lib/less/utils'),
7+
MATH = require('../lib/less/math-constants'),
78
errno,
89
mkdirp;
910

@@ -495,8 +496,17 @@ function processPluginQueue() {
495496
break;
496497
case 'sm':
497498
case 'strict-math':
499+
console.warning('--strict-math is deprecated. Use --math=strict');
498500
if (checkArgFunc(arg, match[2])) {
499-
options.strictMath = checkBooleanArg(match[2]);
501+
if (checkBooleanArg(match[2])) {
502+
options.math = MATH.STRICT_LEGACY;
503+
}
504+
}
505+
break;
506+
case 'm':
507+
case 'math':
508+
if (checkArgFunc(arg, match[2])) {
509+
options.math = match[2];
500510
}
501511
break;
502512
case 'su':

bower.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@
55
"**/.*",
66
"benchmark",
77
"bin",
8-
"build",
9-
"gradle",
108
"lib",
119
"test",
1210
"*.md",
1311
"LICENSE",
1412
"Gruntfile.js",
1513
"*.json",
1614
"*.yml",
17-
"build.gradle",
18-
"gradlew",
19-
"gradlew.bat",
2015
".gitattributes",
2116
".jshintrc",
2217
".npmignore"

0 commit comments

Comments
 (0)