Last active
May 30, 2020 00:47
-
-
Save airtoxin/37d7e7419535fed0e3cf8d80a958e18f to your computer and use it in GitHub Desktop.
curl https:/GISTURL | bash -s NAME_OF_APP
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
npx create-react-app $1 --template typescript | |
cd $1 | |
yarn add -DE prettier typescript | |
SCRIPTS=$(cat package.json | jq -c $'.scripts + {"fmt":"prettier --write \'**/*.{js,jsx,ts,tsx,json,md}\' --ignore-path .gitignore"}') | |
cat package.json | jq ". + {"scripts": $SCRIPTS}" > package.json.tmp | |
mv package.json{.tmp,} | |
COMPILER_OPTIONS=$(cat tsconfig.json | jq -c $'.compilerOptions + {"noImplicitAny": true}') | |
cat tsconfig.json | jq ". + {"compilerOptions": $COMPILER_OPTIONS}" > tsconfig.json.tmp | |
mv tsconfig.json{.tmp,} | |
git add . | |
git commit -m "Add package" | |
yarn fmt | |
git add . | |
git commit -m "fmt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment