Files
odoo_source/addons/web/tooling/disable.sh
T
Simon Genin (ges) 8d57a5cde9 [ADD] web: prettier and eslint tooling
Provide an opt in js tooling system by adding a node env with prettier and eslint configured.
3 bash scripts are provided: enable.sh, disable.sh and reload.sh.

Enable.sh: add to the community root (and optionaly to the enterprise root) the env.
Disable.sh: remove the env.
Reload.sh: disable then enable.
2021-06-18 21:31:27 +02:00

38 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
script="$0"
basename="$(dirname $script)"
read -p "Do you want to delete the tooling installed in enterprise too ? [y, n]" willingToDeleteToolingInEnterprise
if [[ $willingToDeleteToolingInEnterprise != "n" ]]
then
read -p "What is the relative path from community to enterprise ? (../enterprise)" pathToEnterprise
pathToEnterprise=${pathToEnterprise:-../enterprise}
fi
rm -rf $basename/../../../.husky
rm -rf $basename/../../../.eslintignore
rm -rf $basename/../../../.prettierignore
rm -rf $basename/../../../.eslintrc.json
rm -rf $basename/../../../.prettierrc.json
rm -rf $basename/../../../package.json
rm -rf $basename/../../../package-lock.json
rm -rf $basename/../../../node_modules
if [[ $willingToDeleteToolingInEnterprise != "n" ]]
then
rm -rf $basename/../../../$pathToEnterprise/.husky
rm -rf $basename/../../../$pathToEnterprise/.eslintignore
rm -rf $basename/../../../$pathToEnterprise/.prettierignore
rm -rf $basename/../../../$pathToEnterprise/.eslintrc.json
rm -rf $basename/../../../$pathToEnterprise/.prettierrc.json
rm -rf $basename/../../../$pathToEnterprise/package.json
rm -rf $basename/../../../$pathToEnterprise/package-lock.json
rm -rf $basename/../../../$pathToEnterprise/node_modules
fi
echo ""
echo "JS tooling have been removed from the roots"
echo ""