Skip to content
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

Merged
merged 13 commits into from
Dec 13, 2017
Merged

Custom fs option #17

merged 13 commits into from
Dec 13, 2017

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Dec 4, 2017

No description provided.

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.
@matz3
Copy link
Member Author

matz3 commented Dec 12, 2017

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) {
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@svbender svbender left a 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.
Copy link
Contributor

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);
Copy link
Contributor

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

Copy link
Member

@devtomtom devtomtom left a 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

@matz3
Copy link
Member Author

matz3 commented Dec 13, 2017

Also fine from my side. I will resolve the conflicts so that we can merge 👍

@matz3 matz3 merged commit b59575b into master Dec 13, 2017
@matz3 matz3 deleted the custom-fs-option branch December 13, 2017 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants