Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run several grunt tasks in one .bat file

Is it possible to run two grunt tasks in one .bat script?

I tried the following:

grunt --param=val1 --force
grunt --param=val2 --force

But only the first task was run. Any ideas?

like image 895
user2699355 Avatar asked Oct 23 '13 16:10

user2699355


1 Answers

Grunt will exit your BAT when it ends (not sure why, but it does). To ensure you continue running even after grunt exits, you will need to use the "call" function:

call grunt --your-args-here-1
call grunt --your-args-here-2

Note that if the first grunt fail, you will still run the second grunt. I'm not sure how to solve this, and I don't need it, hopefully ^_^

like image 61
FremyCompany Avatar answered Nov 01 '22 10:11

FremyCompany