зеркало из https://github.com/golang/pkgsite.git
all.bash: use locally installed version of prettier
Switching all.bash to use a locally installed version of prettier to remove the expectation that it is globally installed. Change-Id: Ib3bf0da16b3d8bfad817be693fff62776f6e99da Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/313529 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Родитель
e88261ff22
Коммит
d69db84c53
6
all.bash
6
all.bash
|
@ -201,10 +201,10 @@ run_prettier() {
|
|||
if [[ $files = '' ]]; then
|
||||
files=$prettier_file_globs
|
||||
fi
|
||||
if [[ -x "$(command -v prettier)" ]]; then
|
||||
runcmd prettier --write $files
|
||||
if [[ -x "$(command -v npx)" ]]; then
|
||||
runcmd npx prettier --write $files
|
||||
else
|
||||
err "prettier must be installed: see https://prettier.io/docs/en/install.html"
|
||||
runcmd ./devtools/docker_nodejs.sh npx prettier --write $files
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче