sheetify icon indicating copy to clipboard operation
sheetify copied to clipboard

include default plugins

Open yoshuawuyts opened this issue 10 years ago • 6 comments

From https://github.com/sheetify/sheetify/issues/32#issuecomment-170731218

an open question is whether we specify any default plugins, such as what css-modulesify does. specifically i'm thinking of postcss-import, perhaps also a way to pass values around (like this but in our own way).

I reckon including postcss-import is a good call; if any other plugins should be included too this would be the right place to discuss.

yoshuawuyts avatar Jan 17 '16 04:01 yoshuawuyts

Hmm, css-variables could perhaps be a solution to this? - it'd be cool if variables would trickle through to child nodes; perhaps with a global flag set or smth

yoshuawuyts avatar Feb 08 '16 12:02 yoshuawuyts

Perhaps if a stylesheet is imported / declared, but not defined to a variable (e.g. prefix) it is treated as global - intentionally, because no prefix is being used. Do you reckon that's sane behavior?

yoshuawuyts avatar Feb 08 '16 13:02 yoshuawuyts

Alright so postcss-import is not going to fly - even though it's a sync operation, it presumes it's async and starts doing hairy .then() stuff.

Given that we already have syntax for to solve this e.g.

sheetify('module-from-npm')

I don't think there's a need to include this plugin specifically.

I'm going to close this issue for now, as it's holding up a v4 release - going to add tests for module imports tho, as they're not currently being tested I believe.

If any other plugins should perhaps be included, I reckon we should open separate issues for that. Thanks!

yoshuawuyts avatar Feb 09 '16 13:02 yoshuawuyts

Reviving this, as it can be useful for more complex css libs to split up their deps into multiple files (see css-wipe).

This does require that index.js performs actions in an async fashion, as PostCSS decided to support async calls for their api - https://github.com/postcss/postcss-import/issues/41 - big fat refactor is needed for this to work.

yoshuawuyts avatar Feb 15 '16 11:02 yoshuawuyts

I would personally prefer if sheetify didn't come with a lot of plugins. It would be better if you could add them in as you need them with sheetify-postcss.

bcomnes avatar Oct 02 '16 20:10 bcomnes

@bcomnes yup on board with you here

yoshuawuyts avatar Oct 02 '16 22:10 yoshuawuyts