@@ -68,6 +68,9 @@ def workflow(app_name, device, platform, shared):
68
68
# Update app.modules.ts
69
69
app_module_name = 'app.module.ts'
70
70
app_module_path = os .path .join (app_path , 'app' , app_module_name )
71
+ if shared :
72
+ app_module_name = 'app.module.tns.ts'
73
+ app_module_path = os .path .join (app_path , 'src' , 'app' , app_module_name )
71
74
old_string = "import { HomeComponent } from './home/home.component';"
72
75
new_string = "import { ComponentTestComponent } from './module-test/component-test/component-test.component';"
73
76
File .replace (path = app_module_path , old_string = old_string , new_string = new_string )
@@ -76,6 +79,9 @@ def workflow(app_name, device, platform, shared):
76
79
# Update app-routing.module.ts
77
80
app_routing_module_name = 'app-routing.module.ts'
78
81
app_routing_module_path = os .path .join (app_path , 'app' , app_routing_module_name )
82
+ if shared :
83
+ app_routing_module_name = 'app-routing.module.tns.ts'
84
+ app_routing_module_path = os .path .join (app_path , 'src' , 'app' , app_routing_module_name )
79
85
old_string = "import { HomeComponent } from './home/home.component';"
80
86
new_string = "import { ComponentTestComponent } from './module-test/component-test/component-test.component';"
81
87
File .replace (path = app_routing_module_path , old_string = old_string , new_string = new_string )
0 commit comments