@@ -80,39 +80,41 @@ function run(ionic, argv, rawCliArguments) {
8080 hasBuildCommand = results [ 2 ] ;
8181 hasServeCommand = results [ 3 ] ;
8282
83- if ( hasBuildCommand && ! ( isLiveReload && hasServeCommand ) ) {
83+ if ( hasBuildCommand ) {
8484 return npmScripts . runIonicScript ( 'build' ) ;
8585 }
8686 return Q ( ) ;
8787 } )
8888 . then ( function ( ) {
8989
90- if ( isLiveReload && hasServeCommand ) {
90+ if ( isLiveReload && hasServeCommand && false ) {
9191
9292 // using app-scripts and livereload is requested
9393 return ConfigXml . setConfigXml ( process . cwd ( ) , {
9494 devServer : serveUtil . getUrl ( address , port )
95- } ) . then ( function ( ) {
96- isLiveReload = false ;
97- return npmScripts . runIonicScript ( 'serve' , [ '-p' , port , '--address' , address ] ) ;
9895 } ) ;
9996 } else if ( isLiveReload ) {
10097
10198 // not an app-scripts project but the user wants livereload
10299 return cordovaUtils . setupLiveReload ( argv , appDirectory ) ;
103- } else {
104-
105- // ensure the content node was set back to its original
106- return ConfigXml . setConfigXml ( appDirectory , {
107- resetContent : true ,
108- errorWhenNotFound : false
109- } ) ;
110100 }
101+
102+ // ensure the content node was set back to its original
103+ return ConfigXml . setConfigXml ( appDirectory , {
104+ resetContent : true ,
105+ errorWhenNotFound : false
106+ } ) ;
111107 } )
112108 . then ( function ( serveOptions ) {
113109 var optionList = cordovaUtils . filterArgumentsForCordova ( cmdName , argv , rawArgs ) ;
114110 return cordovaUtils . execCordovaCommand ( optionList , isLiveReload , serveOptions ) ;
115111 } )
112+ . then ( function ( ) {
113+ if ( isLiveReload && hasServeCommand && false ) {
114+ return npmScripts . runIonicScript ( 'serve' , [ '-p' , port , '--address' , address ] ) ;
115+ }
116+ return Q ( ) ;
117+ } )
116118 . catch ( function ( ex ) {
117119 if ( ex instanceof Error ) {
118120 log . error ( ex ) ;
0 commit comments