mirror of
https://github.com/google/nomulus.git
synced 2025-08-02 16:02:10 +02:00
Add better integration for console formatting check and apply (#2070)
This commit is contained in:
parent
34b3dd037a
commit
8e31951241
4 changed files with 786 additions and 963 deletions
|
@ -505,6 +505,7 @@ task javaIncrementalFormatCheck {
|
|||
println("Omitting format check: not in a git directory.")
|
||||
}
|
||||
}
|
||||
dependsOn('console-webapp:checkFormatting')
|
||||
}
|
||||
|
||||
// Shows how modified lines in Java source files will change after formatting.
|
||||
|
@ -522,6 +523,7 @@ task javaIncrementalFormatApply {
|
|||
doLast {
|
||||
invokeJavaDiffFormatScript("format")
|
||||
}
|
||||
dependsOn('console-webapp:applyFormatting')
|
||||
}
|
||||
|
||||
task javadoc(type: Javadoc) {
|
||||
|
|
|
@ -50,12 +50,19 @@ task buildConsoleWebappProd(type: Exec) {
|
|||
args 'run', 'build'
|
||||
}
|
||||
|
||||
task applyFormatting() {
|
||||
exec {
|
||||
workingDir "${consoleDir}/"
|
||||
commandLine 'npm', 'run', 'prettify'
|
||||
}
|
||||
task applyFormatting(type: Exec) {
|
||||
workingDir "${consoleDir}/"
|
||||
executable 'npm'
|
||||
args 'run', 'prettify'
|
||||
}
|
||||
|
||||
task checkFormatting(type: Exec) {
|
||||
workingDir "${consoleDir}/"
|
||||
executable 'npm'
|
||||
args 'run', 'prettify:check'
|
||||
}
|
||||
|
||||
tasks.runConsoleWebappUnitTests.dependsOn(tasks.npmInstallDeps)
|
||||
tasks.buildConsoleWebappProd.dependsOn(tasks.npmInstallDeps)
|
||||
tasks.applyFormatting.dependsOn(tasks.npmInstallDeps)
|
||||
tasks.checkFormatting.dependsOn(tasks.npmInstallDeps)
|
||||
|
|
1729
console-webapp/package-lock.json
generated
1729
console-webapp/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -10,6 +10,7 @@
|
|||
"test": "ng test --browsers=ChromeHeadless --watch=false",
|
||||
"run:dev": "",
|
||||
"prettify": "npx prettier --write ./src/",
|
||||
"prettify:check": "npx prettier --check ./src/",
|
||||
"start:dev": "concurrently \"./../gradlew :core:runTestServer\" \"ng serve --proxy-config dev-proxy.config.json\"",
|
||||
"lint": "ng lint"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue