File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 33const path = require ( 'path' ) ;
44const _ = require ( 'lodash' ) ;
55const Promise = require ( 'bluebird' ) ;
6-
76const fs = require ( 'fs-extra' ) ;
8- const outputFileAsync = Promise . promisify ( fs . outputFile ) ;
9- const removeAsync = Promise . promisify ( fs . remove ) ;
107
118const 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 }
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments