@@ -31,7 +31,7 @@ function mapPromiseFnOverGlob(globPattern, mapFn, globOptions) {
31
31
} else if ( result instanceof Promise ) {
32
32
promises . push ( result ) ;
33
33
} else {
34
- promises . push ( Promise . resolve ( result ) ) ;
34
+ promises . push ( Promise . resolve ( result ) ) ;
35
35
}
36
36
} )
37
37
. on ( 'end' , function ( ) {
@@ -49,35 +49,35 @@ function mapPromiseFnOverGlob(globPattern, mapFn, globOptions) {
49
49
}
50
50
51
51
function rmFileGlobAsync ( globPattern ) {
52
- return mapPromiseFnOverGlob ( globPattern , function ( filePath ) {
53
- console . log ( filePath ) ;
54
- var absPath = path . resolve ( baseDir , filePath ) ;
55
- return fse . removeAsync ( absPath ) ;
56
- } , {
52
+ return mapPromiseFnOverGlob ( globPattern , function ( filePath ) {
53
+ console . log ( filePath ) ;
54
+ var absPath = path . resolve ( baseDir , filePath ) ;
55
+ return fse . removeAsync ( absPath ) ;
56
+ } , {
57
57
cwd : baseDir ,
58
58
nodir : true ,
59
59
ignore : [
60
- './node_modules/**'
60
+ './node_modules/**'
61
61
]
62
62
} ) ;
63
63
}
64
64
65
65
function cleanGeneratedFilesAsync ( ) {
66
- // trailing slash will match only directories
67
- var jsPromise = rmFileGlobAsync ( './**/*.autogen.js' ) ;
68
- var jsonPromise = rmFileGlobAsync ( './**/*.autogen.json' ) ;
69
- var jsIndexPromise = rmFileGlobAsync ( './**/index.js' ) ;
66
+ // trailing slash will match only directories
67
+ var jsPromise = rmFileGlobAsync ( './**/*.autogen.js' ) ;
68
+ var jsonPromise = rmFileGlobAsync ( './**/*.autogen.json' ) ;
69
+ var jsIndexPromise = rmFileGlobAsync ( './**/index.js' ) ;
70
70
71
- var pyPromise = rmFileGlobAsync ( '../pythreejs/**/*_autogen.py' ) ;
72
- var pyIndexPromise = rmFileGlobAsync ( '../pythreejs/**/__init__.py' ) ;
71
+ var pyPromise = rmFileGlobAsync ( '../pythreejs/**/*_autogen.py' ) ;
72
+ var pyIndexPromise = rmFileGlobAsync ( '../pythreejs/**/__init__.py' ) ;
73
73
74
- return Promise . all ( [
74
+ return Promise . all ( [
75
75
jsPromise ,
76
76
jsonPromise ,
77
- jsIndexPromise ,
78
- pyPromise ,
79
- pyIndexPromise ,
80
- ] ) ;
77
+ jsIndexPromise ,
78
+ pyPromise ,
79
+ pyIndexPromise ,
80
+ ] ) ;
81
81
}
82
82
83
83
if ( require . main === module ) {
0 commit comments