Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Define cssnext as a postcss plugin internally #173

Closed
MoOx opened this issue Jul 1, 2015 · 4 comments · Fixed by #238
Closed

Define cssnext as a postcss plugin internally #173

MoOx opened this issue Jul 1, 2015 · 4 comments · Fixed by #238

Comments

@MoOx
Copy link
Owner

MoOx commented Jul 1, 2015

We should follow cssnano api

  • cssnext is defined as a postcss plugin (minor change)
  • cssnext(options) return a postcss plugin (current behavior)
  • cssnext(options).process(string) => result should be the implemented & promoted (new interface)
  • maybe we can keep cssnext(string, options) api to avoid a major breaking change (current behavior) - not sure it's a good idea because postcss.plugin might add more change in the future. @ai any comment on that ?

This way, people might use directly cssnext (without braces) as a postcss plugin when postcss/postcss#402 is fixed.

Not a big deal, but I think the reusable instance is a good idea.

Depending if the current api (string, options) can be kept, we might push this as a minor change or as a major bump (2.x)

@ben-eb
Copy link
Contributor

ben-eb commented Jul 1, 2015

I wouldn't recommend overloading your main exported method. Embrace breaking changes. 👍

By the way, process API should look like cssnext.process(str, opts)

@ai
Copy link

ai commented Jul 1, 2015

Nice plan.

I think you should remove cssnext(cssnext, opts) API, because it makes code too complicated.

@MoOx
Copy link
Owner Author

MoOx commented Jul 1, 2015

You cannot say that var css = cssnext(string, options) is complicated versus cssnext(options).process(string).css or cssnext(options).process(string).then(result) { result.css ...}). That's not true ;)

@MoOx
Copy link
Owner Author

MoOx commented Jan 4, 2016

cssnext is now postcss-cssnext. cssnext is deprecated.

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

Successfully merging a pull request may close this issue.

3 participants