Closed jimthedev closed 10 years ago
Hi @jcummins , yes you can use parcelify with sass, and actually there is already a transform available. Check out sass-css-stream. page4
in test
shows how this works. Is that what you were looking for? Let us know if you run into issues!
@dgbeck Perfect! Thanks for that example. That's exactly what I needed.
So my last question for you is, have you used this with gulp? If not, no worries. If so, here is my situation:
I know that both parcelify & browserify have a watcher that is built in and by default it sounds like both packages use streams. The problem is that I want to run parcelify inside of a watcher loop that doesn't die on parcelify bundle errors. Essentially, I want my gulp watcher to handle parcelify failures instead of killing the entire stream.
I'm considering whether a gulp-parcelify plugin would be worth doing. My only concern is that the browserify plugin for gulp has actually been blacklisted (https://github.com/gulpjs/plugins/issues/47). I don't understand well enough to know if the same problems would apply to parcelify. My guess is that it does.
Am I making any sense? :)
Thanks.
Here is a bit better example of what I want to accomplish, but using parcelify instead of browserify: https://gist.github.com/aslansky/9728460
This looks to avoid using a gulp plugin by using gulp-watch and map-stream to wrap browserify with an async function that is then converted into a stream.
Hi @jcummins,
Can you be a little bit more specific on the purpose of gulp in this setup? Sounds like it has to do with bundle errors:
The problem is that I want to run parcelify inside of a watcher loop that doesn't die on parcelify bundle errors.
What are the exact errors that are causing parcelify to exit?
@dgbeck Turns out I just needed to set a listener for on('error')!
I am considering using this with gulp and sass and am not quite sure if that would be possible given the current code?