Last active
September 20, 2022 10:54
-
-
Save kasir-barati/83fc3e23326d1cb1dc93ac790595286d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pnpm create next-app "$@" | |
cd "$1" | |
pnpm i | |
# Add prettier and its script | |
pnpm add -D prettier | |
wget https://gist.githubusercontent.com/kasir-barati/2bcdeea964f88712eca171adb3fbd979/raw/.prettierrc | |
wget https://gist.githubusercontent.com/kasir-barati/8b32cf62e69e6f87a6bed899eefe1cb5/raw/.prettierignore | |
node -e "const { readFileSync, writeFileSync } = require('fs'); const packageJson = JSON.parse(readFileSync('package.json', 'utf-8')); packageJson.scripts = { ...packageJson.scripts, \"format\": \"prettier -w . -u\" }; writeFileSync('package.json', JSON.stringify(packageJson))" | |
# Add License | |
wget https://gist.githubusercontent.com/kasir-barati/7574fdf252e2648ebeb119264bcd442d/raw/LICENCE | |
node -e "const { readFileSync, writeFileSync } = require('fs'); const packageJson = JSON.parse(readFileSync('package.json', 'utf-8')); packageJson.license = 'GPL-3.0'; writeFileSync('package.json', JSON.stringify(packageJson))" | |
# Later works | |
pnpm format | |
git init | |
git add . | |
git commit -m "cleanup: prettified" | |
git branch -m main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment