Skip to content
Permalink
Browse files

Fixed a typo in the build.gradle and added the frontend/dist folder t…

…o the clean task. It is also tried to create the dist folder before the build thread is started, so that the FrontendWatcher will not accidentally try to watch an non existent directory and thus not update the assets correctly.
  • Loading branch information...
finnmartens committed May 24, 2019
1 parent cb3d500 commit 20f26262a11355c229848186318e0da545005c7b
Showing with 6 additions and 3 deletions.
  1. +2 −3 build.gradle
  2. +4 −0 grails-app/init/de/iteratec/osm/FrontendWatcher.groovy
@@ -304,14 +304,13 @@ clean.delete << file('grails-app/assets/javascripts/node_modules')
clean.delete << file('grails-app/assets/javascripts/frontend')
clean.delete << file('grails-app/assets/stylesheets/node_modules')
clean.delete << file('grails-app/assets/stylesheets/frontend')
clean.delete << file('grails-app/assets/other/fronted')
clean.delete << file('grails-app/assets/other/frontend')
clean.delete << file('node_modules')
clean.delete << file('grails-app/assets/javascripts/bower_components')
clean.delete << file('grails-app/assets/stylesheets/bower_components')
// Cleans old npm directory inside .gradle as these are not needed anymore because the build directory is used
clean.delete << file('.gradle/npm')


clean.delete << file('frontend/dist')

sourceSets {
main {
@@ -28,6 +28,10 @@ class FrontendWatcher {
String nodeLocation = new File(nodeExecLocation).getParent()

if (location && nodeLocation) {

String frontendDistFolder = Paths.get("${location}/frontend/dist")
new File(frontendDistFolder).mkdirs()

Thread.start {
String nodeModulesBin = Paths.get("${location}", "frontend", "node_modules", ".bin").toString()

0 comments on commit 20f2626

Please sign in to comment.
You can’t perform that action at this time.