File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ APPNAME=" $1 " # e.g. org.nativescript.myapp
3
+ APPFOLDER=" data/data/$APPNAME /files/app"
4
+ NSACTIVITY=" com.tns.NativeScriptActivity"
5
+
6
+ cd app
7
+ for file_match in " *.js" " *.xml" " *.css" ; do
8
+ find . -iname " $file_match " -print0 | \
9
+ xargs -0 -I FILEPATH -P 16 adb push " FILEPATH" " $APPFOLDER /FILEPATH" \;
10
+ done
11
+
12
+ adb shell am force-stop " $APPNAME "
13
+ adb shell am start -a android.intent.action.MAIN -n " $APPNAME /$NSACTIVITY "
Original file line number Diff line number Diff line change 19
19
" app/nativescript-angular/dom_adapter.ts" ,
20
20
" app/nativescript-angular/text-value-accessor.ts" ,
21
21
" app/nativescript-angular/element-registry.d.ts" ,
22
- " app/nativescript-angular/zone.ts" ,
23
22
" app/nativescript-angular/application.d.ts" ,
24
23
" app/nativescript-angular/renderer.ts" ,
25
24
" app/nativescript-angular/element-registry.ts" ,
26
25
" app/nativescript-angular/xhr.ts" ,
27
- " app/nativescript-angular/zone_patch.ts" ,
28
26
" app/nativescript-angular/directives/ns-directives.ts" ,
29
27
" app/nativescript-angular/directives/tab-view.ts" ,
30
28
" app/nativescript-angular/directives/list-view.ts" ,
46
44
" node_modules" ,
47
45
" platforms"
48
46
]
49
- }
47
+ }
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ import application = require('application');
31
31
32
32
export type ProviderArray = Array < Type | Provider | any [ ] > ;
33
33
34
+ let _platform = null ;
35
+
34
36
export function bootstrap ( appComponentType : any ,
35
37
customProviders : ProviderArray = null ) : Promise < ComponentRef > {
36
38
NativeScriptDomAdapter . makeCurrent ( ) ;
@@ -58,7 +60,10 @@ export function bootstrap(appComponentType: any,
58
60
appProviders . push ( customProviders ) ;
59
61
}
60
62
61
- return platform ( nativeScriptProviders ) . application ( appProviders ) . bootstrap ( appComponentType ) ;
63
+ if ( ! _platform ) {
64
+ _platform = platform ( nativeScriptProviders ) ;
65
+ }
66
+ return _platform . application ( appProviders ) . bootstrap ( appComponentType ) ;
62
67
}
63
68
64
69
export function nativeScriptBootstrap ( appComponentType : any , customProviders ?: ProviderArray , appOptions ?: any ) {
You can’t perform that action at this time.
0 commit comments