Fix build by creating an empty package-lock if none exists

This commit is contained in:
Blue (Lukas Rieger) 2020-01-15 20:57:51 +01:00
parent d8e45f1c00
commit 113aaab865
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,12 @@ node {
download = true
}
task fixPackageLock() {
if (!file("./package-lock.json").exists()) {
file("./package-lock.json").text = ""
}
}
task cleanWebroot(type: Delete) {
delete 'build/generated/webroot/'
}
@ -39,6 +45,7 @@ task zipWebroot(type: Zip) {
// removes tmp build directory, build project with webpack, zip contents for the shaded jar
task buildWebroot {
dependsOn 'fixPackageLock'
dependsOn 'npmInstall'
dependsOn 'cleanWebroot'
dependsOn 'webpackWebroot'