mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-17 13:50:36 +02:00
Attempt to add prettier_plugins
This commit is contained in:
@@ -35,6 +35,10 @@ inputs:
|
|||||||
description: Only prettify files changed in the last commit, can't be used with file_pattern!
|
description: Only prettify files changed in the last commit, can't be used with file_pattern!
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
prettier_plugins:
|
||||||
|
description: Install Prettier plugins, i.e. `@prettier/prettier-php @prettier/some-other-plugin`
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ echo "Installing prettier..."
|
|||||||
case $INPUT_PRETTIER_VERSION in
|
case $INPUT_PRETTIER_VERSION in
|
||||||
false)
|
false)
|
||||||
npm install --silent --global prettier
|
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
|
npm install --silent --global prettier@$INPUT_PRETTIER_VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user