9
9
from core .utils .wait import Wait
10
10
from data .changes import Changes , Sync
11
11
from data .const import Colors
12
+ from products .nativescript .preview_helpers import Preview
12
13
from products .nativescript .run_type import RunType
13
14
from products .nativescript .tns import Tns
14
15
from products .nativescript .tns_logs import TnsLogs
@@ -19,15 +20,15 @@ def __run_vue(app_name, platform, bundle, hmr):
19
20
return Tns .run (app_name = app_name , platform = platform , emulator = True , wait = False , bundle = bundle , hmr = hmr )
20
21
21
22
22
- def __preview_vue (app_name , bundle , hmr ):
23
+ def __preview_vue (app_name , platform , device , bundle , hmr ):
23
24
# Execute `tns run` and wait until logs are OK
24
- return Tns . preview (app_name = app_name , bundle = bundle , hmr = hmr )
25
+ return Preview . run_app (app_name = app_name , bundle = bundle , hmr = hmr , platform = platform , device = device )
25
26
26
27
27
28
def __workflow (preview , app_name , platform , device , bundle = False , hmr = False ):
28
29
# Execute tns command
29
30
if preview :
30
- result = __preview_vue (app_name = app_name , bundle = bundle , hmr = hmr )
31
+ result = __preview_vue (app_name = app_name , platform = platform , device = device , bundle = bundle , hmr = hmr )
31
32
else :
32
33
result = __run_vue (app_name = app_name , platform = platform , bundle = bundle , hmr = hmr )
33
34
0 commit comments