-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to provide custom file system #67
Conversation
The supplied file system is only used for collecting the directory contents. It is not used to read static files like a stylesheet provided by the stylesheet option or for module internal file system operations.
@dougwilson would you mind to have a look? Thanks! |
Hi @RandomByte sorry I didn't see this earlier; I've been having troubles receiving emails from GitHub and there are so many notifications to go through, very sorry. It's funny passing by this now, because there is a debate going on in Node.js core right now on if This is the discussion for context: nodejs/node#18131 There was also several discussions around accepting abstracted |
Hi @dougwilson, Thank you for your reply. This is an interesting discussion over at Node.js core.
I'm afraid, I'm not sure what exactly you are referring to here. Is it the fact that my PR stores a reference to Regarding pillarjs/send#78: I see that there needs to be a contract between a module and its consumer on what such a custom But to get this right: Would the goal of such a pluggable Did I get this right? Besides all that, I found that the invocations of Even though I see the issues mentioned above, maybe this module is not the right place to start solving them? Thank you for taking your time looking into this! |
Yea, pretty much. The changing of the I'm probably missing some there, but we need to set the right expectation for what we need o have in the incoming |
Based on the discussion above, I think a generic The only alternative I can think of would be to have proprietary callback parameters similar to the required For the project I'm working on, we might just implement a custom index listing ourselves. So feel free to close this PR. |
We implemented a custom index listing for our project. Therefore closing this. |
Motivation
We would like to use serve-index on a "virtual" file system which abstracts a physical directory structure. For example, directories on different physical locations may be joined together and presented as a single directory with the content of both.
Prior art
A popular module already providing an option to supply a custom file system is webpack which also offers a memory-fs module.
A popular alternative fs implementation is for example graceful-fs.
CC: @matz3