rotundasoftware / parcelify

Add css to your npm modules consumed with browserify.
MIT License
251 stars 20 forks source link

transform example? #17

Closed alessioalex closed 9 years ago

alessioalex commented 9 years ago

hey @dgbeck sorry to buzz you again, do you have an example with a transform stream so that I can see how that works with parcelify?

I'm not exactly sure how to do that.

My goal is to find all the urls for static assets from a css file (images, fonts loaded).

I just need a basic parcelify example with a transform stream.

Thanks so much

dgbeck commented 9 years ago

Hi @alessioalex , in tests/page4 you can see an example of the sass-css-stream transform being applied to the page4 package. Is that what you had in mind? Also you might want to check out the data url transform if you are planning on writing your own transform since that transform also has to find urls in a css file.

alessioalex commented 9 years ago

yep, thanks. Unfortunately I couldn't make this work (I was doing the command line version, not settings things up in pkg json). I'm not sure if I'm doing it wrong or the transformation doesn't work. I guess I'll do this as a separate module and leave parcelify just for concatenating stylesheets.