Skip to content

Commit d60bd12

Browse files
greenkeeper[bot]s0ph1e
authored andcommitted
Update fs-extra to the latest version 🚀 (#203)
1 parent 13b4e52 commit d60bd12

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lib/resource-saver/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
const path = require('path');
44
const _ = require('lodash');
55
const Promise = require('bluebird');
6-
76
const fs = require('fs-extra');
8-
const outputFileAsync = Promise.promisify(fs.outputFile);
9-
const removeAsync = Promise.promisify(fs.remove);
107

118
const supportedOptions = [ 'directory' ];
129

@@ -35,7 +32,7 @@ class ResourceSaver {
3532
saveResource (resource) {
3633
const filename = path.join(this.absoluteDirectoryPath, resource.getFilename());
3734
const text = resource.getText();
38-
return outputFileAsync(filename, text, { encoding: 'binary' }).then(() => {
35+
return fs.outputFile(filename, text, { encoding: 'binary' }).then(() => {
3936
this.loadedResources.push(resource);
4037
});
4138
}
@@ -46,7 +43,7 @@ class ResourceSaver {
4643
*/
4744
errorCleanup () {
4845
if (!_.isEmpty(this.loadedResources)) {
49-
return removeAsync(this.absoluteDirectoryPath);
46+
return fs.remove(this.absoluteDirectoryPath);
5047
}
5148
return Promise.resolve();
5249
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"cheerio": "0.22.0",
3838
"css-url-parser": "^1.0.0",
3939
"debug": "^2.4.5",
40-
"fs-extra": "^2.0.0",
40+
"fs-extra": "^3.0.0",
4141
"he": "^1.1.0",
4242
"lodash": "^4.11.1",
4343
"normalize-url": "^1.5.3",

0 commit comments

Comments
 (0)