-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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',
@@ -4,7 +4,7 @@ var path = require('path'), | |||
fs = require('../lib/less-node/fs'), | |||
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.
bin/lessc
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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