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

Potential for collisions in plugin options #37

Closed
necolas opened this issue Sep 25, 2014 · 2 comments
Closed

Potential for collisions in plugin options #37

necolas opened this issue Sep 25, 2014 · 2 comments

Comments

@necolas
Copy link

necolas commented Sep 25, 2014

There's no documentation about passing options into plugins (e.g., postcss-custom-properties) but it looks like the options are passed to every plugin. That means postcss and all the plugins share the same level of the options and there's a chance for collisions if any of them use properties with the same name.

Maybe make it possible to set the value of a feature to be an options object?

@MoOx
Copy link
Owner

MoOx commented Sep 25, 2014

I've played a dangerous game indeed because I wanted to make a simple api.
For now all plugins have no conflict (I've been careful about that) & I always try to make name clear enough to avoid that.
But if we add the ability to add other plugins, this can be too dangerous.
Adding options for each feature can be nice & safe, but can be verbose :/
And for example if you have a preserve option for several plugins, you can just pass it once.

Not sure what is the best. Mixing both & merging for each plugins usage ?

@necolas
Copy link
Author

necolas commented Sep 25, 2014

Maybe keep it as-is then until there is an actual problem.

Not sure about supporting the ability to add other plugins - then it starts to turn into a wrapper over postcss. If people need extra stuff you could recommend that they use the same plugins individually in their own custom processing pipeline. Being clearly aligned to CSS draft specs is a good and simple identity, and the tool has that kind of name too :).

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