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