I'm trying to run a gulp watch
when running my Java web-app with Gretty.
I'm using this plugin to run gulp from Gradle.
For the moment, I'm just able to run a single gulp build before the app run by doing this: appRun.dependsOn gulp_build
What I would like is that when I run the app, there is also gulp watch
starting (task gulp_default
in Gradle on my case), so that SCSS files are automatically compiled when I save them without having to restart the app.
I can't just do appRun.dependsOn gulp_build
because gulp_default doesn't return anything, so the gradle task doesn't execute appRun.
Any idea how I can do this?
I found a way, but by using npm to start the app and not gradle.
I used the concurrently package. I start the app by doing npm start
instead of gradle appRun
, and I added this in my package.json:
"scripts": {
"start": "concurrently \"gradle appRun\" \"gulp watch\""
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With