Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Include fs-extra methods #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"dependencies": {
"async": "^1.5.2",
"fs-extra": "^9.1.0",
"mkdirp": "^0.5.1",
"rimraf": "^2.5.2",
"underscore-plus": "1.x"
Expand Down
3 changes: 3 additions & 0 deletions src/fs-plus.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs';
import fsExtra from 'fs-extra';
import Module from 'module';
import path from 'path';

Expand Down Expand Up @@ -829,6 +830,8 @@ module.exports = new Proxy({}, {
get(target, key) {
if (fsPlus.hasOwnProperty(key)) {
return fsPlus[key];
} else if (fsExtra.hasOwnProperty(key)) {
return fsExtra[key];
} else {
return fs[key];
}
Expand Down