Skip to content

Instantly share code, notes, and snippets.

@LeoDog896
Created December 31, 2022 00:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeoDog896/5632cc3fc14c892d74c7c287530d4c08 to your computer and use it in GitHub Desktop.
Save LeoDog896/5632cc3fc14c892d74c7c287530d4c08 to your computer and use it in GitHub Desktop.
parcel-init
JSON=$(cat <<EOF
{
"private": true,
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html --public-url ./",
"format": "prettier --write ."
},
"dependencies": {
}
}
EOF
)
echo "$JSON" > package.json
yarn add parcel
# add prettier
yarn add --dev --exact prettier
echo {}> .prettierrc.json
PRETTIERIGNORE=$(cat <<EOF
dist
.parcel-cache
EOF
)
echo "$PRETTIERIGNORE" > .prettierignore
# add .gitignore
GITIGNORE=$(cat <<EOF
node_modules
dist
.parcel-cache
EOF
)
echo "$GITIGNORE" > .gitignore
@LeoDog896
Copy link
Author

LeoDog896 commented Dec 31, 2022

How to use:

curl -fsSL https://gist.githubusercontent.com/LeoDog896/5632cc3fc14c892d74c7c287530d4c08/raw/9346e81618ea57afbfbbf9ced34e4fecd0b13e3e/parcel-init.sh | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment