forked from openequella/openEQUELLA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
30 lines (30 loc) · 1.4 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"name": "openequella",
"private": true,
"scripts": {
"install": "cross-env-shell \"./coursier bootstrap com.geirsson:scalafmt-cli_2.12:1.5.1 -f -o node_modules/.bin/scalafmt && ./coursier bootstrap com.google.googlejavaformat:google-java-format:1.7 -f -o node_modules/.bin/google-java-format\"",
"format-commit:scala": "git-format-staged -f \"scalafmt --stdin --assume-filename \\\"{}\\\"\" \"*.scala\" \"*.sbt\"",
"format-commit:java": "git-format-staged -f \"google-java-format --assume-filename \\\"{}\\\" -\" \"*.java\"",
"format:scala": "find . -name \"*.scala\" -o -name \"*.sbt\" | xargs scalafmt",
"format:java": "find . -name \"*.java\" | xargs google-java-format -r",
"format:ts": "prettier --write \"Source/Plugins/Core/**/*.{ts,tsx}\"",
"check:scala": "find . -name '*.scala' -o -name '*.sbt' | xargs scalafmt --test",
"check:java": "find . -name '*.java' | xargs google-java-format -n --set-exit-if-changed",
"check:ts": "prettier -c \"Source/Plugins/Core/**/*.{ts,tsx}\"",
"check": "run-s check:*",
"format": "run-s format:*"
},
"devDependencies": {
"git-format-staged": "2.1.0",
"husky": "1.3.1",
"prettier": "1.16.4",
"pretty-quick": "1.10.0",
"npm-run-all": "4.1.5",
"cross-env": "5.2.1"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged && npm run format-commit:scala && npm run format-commit:java"
}
}
}