Replies: 1 comment
-
One of the core approaches with gulp directly allows you to replace your own fs access - gulp.src and gulp.dest are just vinyl-fs under the hood. As long as your .src and .dest functions for your own fs provider produce Vinyl objects (https://github.com/gulpjs/vinyl), it will work with anything in the gulp ecosystem. There are other vinyl adapters for http, s3, etc. in the wild for reference. If I were in your shoes I would fork vinyl-fs into a vinyl-memfs repo and replace any usage of fs with memfs and it should work, the globbing part may be a bit tricky though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Id like to have something like
Gulp.useFs(someOtherFs)
orGulp.src("./pathToSmth", {fs: someOtherFs})
where someOtherFs is an instance of memfs or any other accaptable fs. This will greatly increase the speed of work and reduce the load on hard/solid drive if user simply copies the src to ram at the start and will continue to use it. Adding files to src can be handled by a simple watch task that copies files new from disk to ram. Now I'm using gulp-mem but it only provides middleware for browsersync and dest methodBeta Was this translation helpful? Give feedback.
All reactions