From 193559158f3e609b9f65a3550ccb9163e68c1515 Mon Sep 17 00:00:00 2001 From: "Sebastian K. Sorensen" Date: Sun, 10 Jan 2021 14:22:14 +0100 Subject: [PATCH] Attempt to add prettier_plugins --- action.yml | 4 ++++ entrypoint.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 1314f93..63aacb7 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/entrypoint.sh b/entrypoint.sh index 4db8011..b9fb0c9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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