handlebars-wax icon indicating copy to clipboard operation
handlebars-wax copied to clipboard

Allow hb-wax to work with a different filesystem

Open MikeLindenau opened this issue 6 years ago • 4 comments

I use s3 as my filesystem so while I want to use wax, cant as it is obviously based on local fs. Would love to discuss an approach to add the ability to pass in a fs binding.

MikeLindenau avatar Jan 10 '18 15:01 MikeLindenau

Interesting idea. I'm currently making liberal use of fs.readFileSync. I'm guessing an s3 fs lib would need to run async?

shannonmoeller avatar Jan 10 '18 16:01 shannonmoeller

ya working on below which I just put into a fork of wax... will share fork details when I have it working. Added a sync wrapper around read to work as a replacement for fs.readFileSync

https://github.com/Gumspace/remote-fs (super raw)

MikeLindenau avatar Jan 10 '18 16:01 MikeLindenau

Will remote-fs support more than just s3? If not how does it compare to http://npm.im/s3fs?

shannonmoeller avatar Jan 12 '18 15:01 shannonmoeller

Ya, so my use case requires the ability to be able to switch between local, s3, and possibly another remote fs. That said, I didn't find the above suggestion so thanks for sharing. I have actually used it now for the s3 bindings in remote-fs.

Please note though, I'm not suggesting any dependency or promoting the use or remote-fs. In fact its still very much just there to serve what I and not ready for general production use. I really just wanted to suggest wax be able to allow any binding that supports an fs interface you need.

MikeLindenau avatar Jan 13 '18 19:01 MikeLindenau