mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
Added option clean_node_folder for #108
This commit is contained in:
@@ -74,11 +74,14 @@ echo "Files:"
|
||||
prettier $INPUT_PRETTIER_OPTIONS \
|
||||
|| { PRETTIER_RESULT=$?; echo "Problem running prettier with $INPUT_PRETTIER_OPTIONS"; exit 1; }
|
||||
|
||||
# Ignore node modules and other action created files
|
||||
if [ -d 'node_modules' ]; then
|
||||
rm -r node_modules/
|
||||
else
|
||||
echo "No node_modules/ folder."
|
||||
# Removing the node_modules folder, so it doesn't get committed if it is not added in gitignore
|
||||
if $INPUT_CLEAN_NODE_FOLDER; then
|
||||
echo "Deleting node_modules/ folder..."
|
||||
if [ -d 'node_modules' ]; then
|
||||
rm -r node_modules/
|
||||
else
|
||||
echo "No node_modules/ folder."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f 'package-lock.json' ]; then
|
||||
|
||||
Reference in New Issue
Block a user