File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,16 @@ export class PlatformService implements IPlatformService {
160
160
. filter ( directoryName => directoryName !== "tns_modules" )
161
161
. each ( directoryName => this . $fs . deleteDirectory ( path . join ( appDestinationDirectoryPath , directoryName ) ) . wait ( ) )
162
162
. value ( ) ;
163
- shell . cp ( "-Rf" , appSourceDirectoryPath , platformData . appDestinationDirectoryPath ) ;
163
+
164
+ // Copy all files from app dir, but make sure to exclude tns_modules
165
+ let sourceFiles = this . $fs . readDirectory ( appSourceDirectoryPath ) . wait ( ) ;
166
+ if ( _ . contains ( sourceFiles , "tns_modules" ) ) {
167
+ this . $logger . warn ( "You have tns_modules dir in your app folder. It will not be used and you can safely remove it." ) ;
168
+ }
169
+
170
+ sourceFiles . filter ( source => source !== "tns_modules" )
171
+ . map ( source => path . join ( appSourceDirectoryPath , source ) )
172
+ . forEach ( source => shell . cp ( "-Rf" , source , appDestinationDirectoryPath ) ) ;
164
173
165
174
// Copy App_Resources to project root folder
166
175
this . $fs . ensureDirectoryExists ( platformData . platformProjectService . getAppResourcesDestinationDirectoryPath ( ) . wait ( ) ) . wait ( ) ; // Should be deleted
You can’t perform that action at this time.
0 commit comments