[question] vinyl virtual adapter
tmcw opened this issue · 6 comments
Admittedly a question: is there a module that works with vinyl that would allow piping files from a stream of vinyl objects into a virtual filesystem? I'm working on a live reloading server for which it'd be useful to never save the results of a stream to disk, but to keep them in memory so that they can be served over HTTP.
I think the closest thing to this would be https://www.npmjs.com/package/gulp-cached but it isn't really the same thing. I've often thought about a similar thing to what you are building so that's pretty awesome. I'm wondering if this has any tie-in to gulpjs/gulp#357
I believe this is what mem-fs
does, but I'm not 100%.
Looks like it uses a pretty old version of vinyl though...
So far I'm working on a very minimal server that keeps an array of files around - I'm not sure if it'll be enough, but it's working so far.
@tmcw - You might find some useful code in https://github.com/marak/vinyl-http
Let me know when this is finished! This idea was actually what helped refine the concept of vinyl as a virtual file object
I eventually wrote a very simple memory-only server that I concat and set files on. It works very well for this usecase.