Repository navigation
Feature/rewrite urls - #3248
Feature/rewrite urls#3248
Conversation
- Rename isPathRelative to pathRequiresRewrite - Add special handling for rewriteUrls=relative - Add rewritePath for path rewriting - Ensure that explicit relative paths stay explicit relative - Remove code style inconsistencies
- Rename explicit-relative to local - Add rewrite-urls argument validation - Replace unknown CSS property background-url with background-image Based on discussion #3041
- Remove redundant tests - Add rootpath-rewrite-urls-all test - Add rootpath-rewrite-urls-local test
|
Tests failing. The failure is the same as some other PRs. |
|
@calvinjuarez I think this is something wrong with our tests rather than the PR, since it happens everywhere and also happens randomly (and doesn't happen for Appveyor). Maybe some polyfill is loading asynchronously in Node 9 for PhantomJS? |
|
This should probably wait until #3274 is merged and then do the "options upgrade" the same way. |
* 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
# Conflicts: # bin/lessc # lib/less-browser/add-default-options.js # lib/less-node/lessc-helper.js # lib/less/parse.js # test/index.js # test/less/math/parens-division/parens.less # test/less/math/strict/parens.less # test/less/strict-math/parens.less
|
I redid this branch to use the same "upgrade" pattern as the strictMath-to-math upgrade pattern. That is, any options sent to |
# Conflicts: # bin/lessc
|
@less/core Since I don't have a firm grasp of this feature, I think it the tests should be reviewed by @jhnns and others before this is merged to see if the input/output is intuitive and as expected. I didn't really verify the feature; I just got it working / synced with master. |
calvinjuarez
left a comment
There was a problem hiding this comment.
I'm not sure I'm fully qualified to pass this one off, since I haven't been following the issue, but I'll work my way through the code. For now, just a couple questions/thoughts.
We could add tests for the deprecation warning to the Grunt opts test.
Gruntfile.js @ ln. 204
'node bin/lessc --relative-urls test/less/lazy-eval.less tmp/lazy-eval.css',| os = require('os'), | ||
| utils = require('../lib/less/utils'), | ||
| MATH = require('../lib/less/math-constants'), | ||
| Constants = require('../lib/less/constants'), |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| case 'ru': | ||
| case 'relative-urls': | ||
| options.relativeUrls = true; | ||
| console.warn('The relative-urls option has been replaced by the rewrite-urls option and will be removed.'); |
There was a problem hiding this comment.
Consider rephrasing to match other deprecation warnings?
The --relative-urls option has been deprecated. Use --rewrite-urls=all.
(I'm not entirely sure which rewrite-urls corresponds to relative-urls.)
|
Looks good to me 👍 :) |
|
Thanks @jhnns! |
|
@jhnns Would you be willing to write up documentation in a pull request for https://github.com/less/less-docs? You can see an example of option deprecation for the new |
|
Sure, I can do that :) |
Moved from #3041