@@ -69,7 +69,7 @@ function archive_project(lt_config) {
69
69
console . log ( "Ignoring files: " , ignore_files ) ;
70
70
archive . glob (
71
71
"**/*" ,
72
- { cwd : process . cwd ( ) , ignore : ignore_files , dot : true } ,
72
+ { cwd : process . cwd ( ) , ignore : ignore_files , dot : false } ,
73
73
{ prefix : "project/" }
74
74
) ;
75
75
//OverRide NPM Dependencies
@@ -90,12 +90,12 @@ function archive_project(lt_config) {
90
90
{ prefix : "project/" }
91
91
) ;
92
92
}
93
- if (
94
- lt_config . run_settings . dep_tokens &&
95
- lt_config . run_settings . dep_tokens . length > 0
96
- ) {
97
- if ( fs . existsSync ( ".npmrc" ) ) {
98
- let raw_data = fs . readFileSync ( ".npmrc" , "utf8" ) ;
93
+ if ( fs . existsSync ( ".npmrc" ) ) {
94
+ let raw_data = fs . readFileSync ( ".npmrc" , "utf8" ) ;
95
+ if (
96
+ lt_config . run_settings . dep_tokens &&
97
+ lt_config . run_settings . dep_tokens . length > 0
98
+ ) {
99
99
let replace_map = { } ;
100
100
for ( let i = 0 ; i < lt_config . run_settings . dep_tokens . length ; i ++ ) {
101
101
if ( process . env [ lt_config . run_settings . dep_tokens [ i ] ] ) {
@@ -115,18 +115,21 @@ function archive_project(lt_config) {
115
115
raw_data = raw_data . replace ( re , function ( matched ) {
116
116
return replace_map [ matched ] ;
117
117
} ) ;
118
- archive . append (
119
- raw_data ,
120
- {
121
- name : "project/.npmrc" ,
122
- cwd : process . cwd ( ) ,
123
- ignore : ignore_files ,
124
- } ,
125
- { prefix : "project/" }
126
- ) ;
127
- } else {
128
- reject ( "Dep Tokens are passed but .npmrc does not exist" ) ;
129
118
}
119
+ archive . append (
120
+ raw_data ,
121
+ {
122
+ name : "project/.npmrc" ,
123
+ cwd : process . cwd ( ) ,
124
+ ignore : ignore_files ,
125
+ } ,
126
+ { prefix : "project/" }
127
+ ) ;
128
+ } else if (
129
+ lt_config . run_settings . dep_tokens &&
130
+ lt_config . run_settings . dep_tokens . length > 0
131
+ ) {
132
+ reject ( "Dep Tokens are passed but .npmrc does not exist" ) ;
130
133
}
131
134
132
135
archive . finalize ( ) ;
0 commit comments