csantanapr / grunt-cordovacli

Wraps web app with Cordova CLI using GruntJS
Apache License 2.0
60 stars 31 forks source link

Can't use `serve` with grunt-contrib-watch #10

Closed bryanforbes closed 10 years ago

bryanforbes commented 10 years ago

In my app, I'm using Stylus to generate CSS. I'd like to have a watch task running that calls cordova prepare when the .styl files change, however the serve command blocks the grunt thread so it never gets to the watch task.

csantanapr commented 10 years ago

Hi @bryanforbes you mean cordova serve?, that's a the cordova CLI doing that. Try running cordova serve from command line you need to exit with Ctrl+C. Nothing that the this grunt plugin can do. I think you should be able to implement a watch and just run prepare. Do not run cordova serve, if you want to run serve run serve in another terminal window or use a grunt plugin like contrib-connect with livereload feature.