@@ -25,10 +25,14 @@ module.exports = function() {
25
25
ignore : path . join ( '**' , '*-spec.*' )
26
26
} )
27
27
) ;
28
+
29
+ const copyPromises = [ ] ;
28
30
for ( let srcPath of srcPaths ) {
29
- fs . copySync ( srcPath , computeDestinationPath ( srcPath ) , {
30
- filter : includePathInPackagedApp
31
- } ) ;
31
+ copyPromises . push (
32
+ fs . copy ( srcPath , computeDestinationPath ( srcPath ) , {
33
+ filter : includePathInPackagedApp
34
+ } )
35
+ ) ;
32
36
}
33
37
34
38
// Run a copy pass to dereference symlinked directories under node_modules.
@@ -50,20 +54,26 @@ module.exports = function() {
50
54
'node_modules' ,
51
55
path . basename ( modulePath )
52
56
) ;
53
- fs . copySync ( modulePath , destPath , { filter : includePathInPackagedApp } ) ;
57
+ copyPromises . push (
58
+ fs . copy ( modulePath , destPath , { filter : includePathInPackagedApp } )
59
+ ) ;
54
60
} ) ;
55
61
56
- fs . copySync (
57
- path . join (
58
- CONFIG . repositoryRootPath ,
59
- 'resources' ,
60
- 'app-icons' ,
61
- CONFIG . channel ,
62
- 'png' ,
63
- '1024.png'
64
- ) ,
65
- path . join ( CONFIG . intermediateAppPath , 'resources' , 'atom.png' )
62
+ copyPromises . push (
63
+ fs . copy (
64
+ path . join (
65
+ CONFIG . repositoryRootPath ,
66
+ 'resources' ,
67
+ 'app-icons' ,
68
+ CONFIG . channel ,
69
+ 'png' ,
70
+ '1024.png'
71
+ ) ,
72
+ path . join ( CONFIG . intermediateAppPath , 'resources' , 'atom.png' )
73
+ )
66
74
) ;
75
+
76
+ return Promise . all ( copyPromises ) ;
67
77
} ;
68
78
69
79
function computeDestinationPath ( srcPath ) {
0 commit comments