Run gulp watches at the same time than gretty

I am trying to start gulp watch when starting my Java web application using Gretty. I use this plugin to run gulp from Gradle.

At the moment, I can run only one gulp construct before launching the application: appRun.dependsOn gulp_build

What I would like is that when starting the application there is also a gulp watch start (task gulp_default in Gradle in my case), so that the SCSS files are automatically compiled, when I save them, restart the application.

I can't just make appRun.dependsOn gulp_build because gulp_default returns nothing, so the Gradle task does not execute appRun.

Any idea how I can do this?

+5
source share
1 answer

I found a way, but using npm to run the application, not gradle.

I used concurrently . I started the application by running npm start instead of gradle appRun and added this to my package.json package:

 "scripts": { "start": "concurrently \"gradle appRun\" \"gulp watch\"" } 
+4
source

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


All Articles