Start
ng new [name] --create-application=false --package-manager=yarn
Git Flow
git flow init
Git Hooks
mkdir -p .git/hooks && echo '#!/bin/sh\\n\\necho "Running yarn format..."\\nyarn format\\n\\nif [ $? -ne 0 ]; then\\n echo "yarn format failed, commit aborted"\\n exit 1\\nfi\\n\\necho "yarn format completed successfully"\\nexit 0' > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
Development Dependencies
Prettier
- Adicionar o
prettier
, seus plugins e criar os arquivos de configuração:
yarn add prettier --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier"';
yarn add prettier-plugin-package --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier-plugin-package"';
yarn add prettier-plugin-tailwindcss --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier-plugin-tailwindcss"';
echo "{}" > .prettierrc;
git add -A;
git commit -m 'chore(prettier): cria o ".prettierrc"';
echo ".angular\\\\ndist" > .prettierignore;
git add -A;
git commit -m 'chore(prettier): cria o ".prettierignore"'
- Instalar o
prettier-plugin-prisma
?
yarn add prettier-plugin-prisma --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier-plugin-prisma"'
- Adicionar o script
format
:
"format": "prettier --write \\"**/*.{css,html,js,json,md,scss,ts,tsx}\\""
git add -A;
git commit -m 'chore(prettier): adiciona o script "format"';
yarn format;
git add -A;
git commit -m 'style(prettier): formata código'
Tailwind CSS