Attempt to add prettier_plugins

This commit is contained in:
Sebastian K. Sorensen
2021-01-10 14:22:14 +01:00
parent 34cc6fde0a
commit 193559158f
2 changed files with 7 additions and 0 deletions

View File

@@ -35,6 +35,10 @@ inputs:
description: Only prettify files changed in the last commit, can't be used with file_pattern!
required: false
default: false
prettier_plugins:
description: Install Prettier plugins, i.e. `@prettier/prettier-php @prettier/some-other-plugin`
required: false
default: false
runs:
using: 'docker'

View File

@@ -30,6 +30,9 @@ echo "Installing prettier..."
case $INPUT_PRETTIER_VERSION in
false)
npm install --silent --global prettier
if $INPUT_PRETTIER_PLUGINS; then
npm install --silent --global $INPUT_PRETTIER_PLUGINS
fi
;;
*)
npm install --silent --global prettier@$INPUT_PRETTIER_VERSION