Added option clean_node_folder for #108

This commit is contained in:
2023-01-23 12:56:23 +01:00
parent 2e9c875edd
commit 2826053f0c
3 changed files with 14 additions and 5 deletions

View File

@@ -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