-
Notifications
You must be signed in to change notification settings - Fork 13
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
Custom fs option #17
Custom fs option #17
Conversation
Otherwise less would still use the native "fs" module.
When using a custom "fs", the lessInputPath might not be as expected when trying to get the corresponding sap/ui/core path. Therefore the "library.name" option will be used to resolve the core namespace.
Add test for a simple interface and check that it is actually called.
Added docs / tests |
lib/index.js
Outdated
var fnFileHandler; | ||
if (options.rootPaths && options.rootPaths.length > 0) { | ||
if (options.rootPaths && options.rootPaths.length > 0 || that.customFs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add brackets to make the condition easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far
README.md
Outdated
##### fs | ||
Type: [Node.js `fs` interface](https://nodejs.org/api/fs.html) | ||
|
||
By default, all file system accees is done via the standard Node.js file system ("fs"). With this option an alternative file system can be passed and will be used for all file system operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access
if (rootPaths && rootPaths.length > 0) { | ||
return statFiles( | ||
rootPaths.map(function(rootPath) { | ||
return path.join(rootPath, filePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use path.posix.join
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Also fine from my side. I will resolve the conflicts so that we can merge 👍 |
No description provided.