Fixed the npm build to use ci option
@@ -82,6 +82,14 @@ task npmAuditFix(type: NpmTask) {
args = ['audit', 'fix']
}
+task npmCi(type: NpmTask) {
+ dependsOn npmSetup
+ npmCommand = ["ci"]
+ inputs.file("package.json")
+ inputs.file("package-lock.json")
+ outputs.dir("node_modules")
+}
+
task customizeSwaggerUi {
doLast {
copy {
@@ -133,7 +141,13 @@ task cleanup(type: Delete) {
}
clean.dependsOn(cleanup)
+if (project.hasProperty("local")) {
npmTest.dependsOn(npm_install)
npmBuild.dependsOn(npm_install, npmTest)
+} else {
+ npmTest.dependsOn(npmCi)
+ npmBuild.dependsOn(npmCi, npmTest)
+}
+
customizeSwaggerUi.dependsOn(unzip, npmBuild)
jar.dependsOn(customizeSwaggerUi)
