Running grunt stops the script package

I am developing with corridor and yomen + angular. I adopted the folder structure as follows (dir command output on windows):

C:\code\cordova\pg-droid-app>dir Volume in drive C is OSDisk Volume Serial Number is 404D-C81B Directory of C:\code\cordova\pg-droid-app 01/01/2015 03:46 PM <DIR> . 01/01/2015 03:46 PM <DIR> .. 01/01/2015 03:10 PM <DIR> pgdroid 01/01/2015 03:50 PM <DIR> pgdroid-app-frontend 01/01/2015 03:50 PM 241 showapp.bat 1 File(s) 241 bytes 4 Dir(s) 65,102,319,616 bytes free 

pgdroid-app-frontend is the folder in which I ran yo angular (yoman-angular generator). pgdroid is the folder where the cordova project is installed.

Grunt is configured to copy the output of my work with HTML-dev to the pgdroid\www folder. It works great.

Now, to make showapp.bat easier, I created the following batch of script ( showapp.bat ):

 echo === Running grunt... === cd pgdroid-app-frontend grunt --force echo === End Running grunt... === echo === Running cordova emulator === cd ..\pgdroid cordova run android cd .. echo === End Running cordova emulator === 

The file is placed in the root directory (see the first output, general here). Script execution terminates after grunt is executed. I guess this is the behavior of a grunt program. It may not return a success exit code, which could be the reason the script stopped.

What is the workaround for this?

+5
source share
1 answer

grunt behaves like a .bat file (windows batch) or a batch program. Therefore, in a batch program, if you want to run another batch program, you need the call prefix before it.

 call grunt --force 
+9
source

Source: https://habr.com/ru/post/1210210/


All Articles