-
Notifications
You must be signed in to change notification settings - Fork 52
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
Conform to browserslist API #81
Conversation
Yeap. @DamienRobert note that tests were failed |
Hum I need to update the code to only pass '{path: from}' when it is well defined. Indeed browserslist fallback to '.' is as follow:
so passing a undefined 'path' prevents the fallback. Edit: I updated the PR |
Commit a1bf895 changed the browserslist request from browserslist(this.browsersRequest) to browserslist(this.browsersRequest, { from }) But in browserslist the option name for the path is 'path'. This commit corrects this. Note that this means that before, since 'path' was not specified, browserslist would fallback to the current working directory for the config file look up. With this commit, if no queries are specified, browserslist will look up for a config file up from the specified path rather than the current working directory. This conforms with autoprefixer behavior. Note that we only pass 'from' if it is not null, this allows browserslist to fallback to the current directory when no path is provided.
This let browserslist pick up a '.browserslistrc' if no browsers are provided. If such a file is not found it will default to browserslist.defaults anyway.
I pushed a new commit to let the cli be able to work with a .browserslistrc rather than defaulting always to browserslist.defaults. |
@DamienRobert it is awesome work! Bu the way, maybe you want to have a popular open source project and want to maintain this awesome project? Current maintainer is looking for the replacement. And this project is the best way to get experience since I will help here. |
Thanks for merging this! @ai: unfortunately I really don't have time to help maintain a project right now, sorry! |
Commit a1bf895 changed the browserslist
request from
browserslist(this.browsersRequest)
to
browserslist(this.browsersRequest, { from })
But in browserslist the option name for the path is 'path'. This commit
corrects this. Note that this means that before, since 'path' was not specified,
browserslist would fallback to the current working directory for the
config file look up.
With this commit, if no queries are specified, browserslist will look up
for a config file up from the specified path rather than the current working
directory. This conforms with autoprefixer behavior.