Skip to content

Instantly share code, notes, and snippets.

@briandeheus
Created March 6, 2019 08:49
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 briandeheus/3ccc9ed9557fd2e61d56c212d02f976e to your computer and use it in GitHub Desktop.
Save briandeheus/3ccc9ed9557fd2e61d56c212d02f976e to your computer and use it in GitHub Desktop.
Parcel + React + Sass setup script
#!/bin/bash
package_json='
{
"name": "frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"node-sass": "^4.11.0",
"parcel-bundler": "^1.11.0",
"react": "^16.8.3",
"react-dom": "^16.8.3"
}
}'
babelrc='
{
"presets": ["env", "react"],
"plugins": ["transform-class-properties", "transform-object-rest-spread"]
}
'
echo -e "$package_json" > package.json
echo -e "$babelrc" > .babelrc.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment