@@ -13,29 +13,31 @@ module.exports = ({ source, target, fingerprint, configDir }) => {
1313 filesToCopy = tree ( source ) ;
1414 }
1515
16- return filesToCopy . then ( sources => {
17- return Promise . all ( sources . map ( fileName => {
18- let sourcePath = path . join ( source , fileName ) ;
16+ return filesToCopy .
17+ then ( files => files . filter ( file => ! file . startsWith ( "." ) ) ) .
18+ then ( sources => {
19+ return Promise . all ( sources . map ( fileName => {
20+ let sourcePath = path . join ( source , fileName ) ;
1921
20- return readFile ( sourcePath ) . then ( content => {
21- let targetPath = path . join ( target , fileName ) ;
22- let outputPath = targetPath ;
22+ return readFile ( sourcePath ) . then ( content => {
23+ let targetPath = path . join ( target , fileName ) ;
24+ let outputPath = targetPath ;
2325
24- if ( fingerprint ) {
25- outputPath = path . join ( target ,
26- generateFingerprint ( fileName , content ) ) ;
27- }
26+ if ( fingerprint ) {
27+ outputPath = path . join ( target ,
28+ generateFingerprint ( fileName , content ) ) ;
29+ }
2830
29- return createFile ( outputPath , content ) . then ( _ => {
30- return {
31- changed : true ,
32- target : path . relative ( configDir , targetPath ) ,
33- output : path . relative ( configDir , outputPath )
34- } ;
31+ return createFile ( outputPath , content ) . then ( _ => {
32+ return {
33+ changed : true ,
34+ target : path . relative ( configDir , targetPath ) ,
35+ output : path . relative ( configDir , outputPath )
36+ } ;
37+ } ) ;
3538 } ) ;
36- } ) ;
37- } ) ) ;
38- } ) ;
39+ } ) ) ;
40+ } ) ;
3941 } ;
4042} ;
4143
0 commit comments