Skip to content

Commit

Permalink
Default build set to 'prod', npm prod build installs from package-lock
Browse files Browse the repository at this point in the history
Travis cache test
  • Loading branch information
DavidBonnemaison committed Jun 21, 2020
1 parent f38dfa8 commit 0bb4b81
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ apply from: "gradle/docker.gradle"
apply from: "gradle/sonar.gradle"
//jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here

if (project.hasProperty("prod")) {
apply from: "gradle/profile_prod.gradle"
} else {
if (project.hasProperty("dev")) {
apply from: "gradle/profile_dev.gradle"
} else {
apply from: "gradle/profile_prod.gradle"
}

if (project.hasProperty("war")) {
Expand Down
6 changes: 5 additions & 1 deletion gradle/profile_dev.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ bootRun {
args = []
}

task looseInstall(type: NpmTask) {
args = ["install"]
}

task buildFront(type: NpmTask) {
dependsOn npmInstall
dependsOn looseInstall
args = ["run", "build:dev"]
}

Expand Down
6 changes: 5 additions & 1 deletion gradle/profile_prod.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ bootRun {
args = []
}

task strictInstall(type: NpmTask) {
args = ["ci"]
}

task buildFront(type: NpmTask) {
dependsOn npmInstall
dependsOn strictInstall
args = ["run", "build"]
}

Expand Down

0 comments on commit 0bb4b81

Please sign in to comment.