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

should be able to return a postcss plugin #3

Closed
MoOx opened this issue Aug 6, 2014 · 8 comments
Closed

should be able to return a postcss plugin #3

MoOx opened this issue Aug 6, 2014 · 8 comments
Assignees
Milestone

Comments

@MoOx
Copy link
Owner

MoOx commented Aug 6, 2014

var cssnext = require("cssnext")
typeof cssnext === "function" // should be true
@necolas
Copy link

necolas commented Sep 25, 2014

why not expose it like features is exported, e.g., css-flip?

@MoOx
Copy link
Owner Author

MoOx commented Sep 25, 2014

This issue was a reminder but can be handled this way (by return a postcss plugin).
So yeah, the idea is to expose.
I've already done that I think https://github.com/cssnext/cssnext/blob/master/index.js#L69
But I want to add a simpler way to add plugin before or after some other (to allow perfect control).
Maybe an API like addFeature(), insertFeatureBefore() & insertFeatureAfter() can help ?

@MoOx
Copy link
Owner Author

MoOx commented Sep 25, 2014

FYI, here is the blocker postcss/postcss#74

@MoOx
Copy link
Owner Author

MoOx commented Oct 9, 2014

Well, we can forget this idea, people can use plugins by themselves.

@MoOx MoOx closed this as completed Oct 9, 2014
@necolas
Copy link

necolas commented Oct 9, 2014

hmm, i think exposing it as a plugin would be pretty useful and easy.

@MoOx
Copy link
Owner Author

MoOx commented Oct 9, 2014

Can't be done for now. I'm waiting for a postcss change here to make this happen postcss/postcss#74 (please give your opinion over there @necolas :)
But maybe you are right, this would be nice.

@MoOx MoOx reopened this Oct 9, 2014
@MoOx
Copy link
Owner Author

MoOx commented Oct 24, 2014

Ok I've made a pr so postcss.use() can consume plugin of another postcss instance.
postcss/postcss#115

This PR is merged in tokenizer branch (future v3).
As soon as v3 is released, we might be able to do this

postcss.use(cssnext()).use(whatever).process()

I just need to return postcss instance when there is no string given has a first param to be ready for that :)

MoOx added a commit that referenced this issue Nov 2, 2014
This will be nice when postcss 3 will be released

Ref #3
@MoOx
Copy link
Owner Author

MoOx commented Nov 2, 2014

Done.
I'll just close this issue when postcs 3 is out.

@MoOx MoOx closed this as completed in 86bf0ea Nov 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants