Skip to content
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

Convention use(plugin()) should be maintained #6

Closed
vanthome opened this issue Jul 16, 2014 · 2 comments
Closed

Convention use(plugin()) should be maintained #6

vanthome opened this issue Jul 16, 2014 · 2 comments

Comments

@vanthome
Copy link
Contributor

All rework plugins are used like
css.use(colors());
but this one is:
css.use(color);
This breaks an undocumented convention and would be nice if it would adhere to it.

@MoOx
Copy link

MoOx commented Jul 17, 2014

It's not really an "undocumented" convention.
Ex: rework-calc doesn't return a function.
Plugins that return a function are plugins that need (or accept) option(s) or that need a specific scope (for keeping internal stuff in memory).
Like rework-calc, it's not needed to return a function because this plugin only does a simple conversion.

That being said, I plan to add preserve option (like I did for rework-vars) so this plugin can act as a fallback, so you will be probably happy with that :) (-> need for option -> module is a function)

@vanthome
Copy link
Contributor Author

sure :) thanks for the outlook!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants