Skip to content

Instantly share code, notes, and snippets.

@Joel-OConnor
Last active October 23, 2018 14:39
Show Gist options
  • Save Joel-OConnor/e9c103508682b06e729862040127c4e6 to your computer and use it in GitHub Desktop.
Save Joel-OConnor/e9c103508682b06e729862040127c4e6 to your computer and use it in GitHub Desktop.
On any npm package you can use -S to save to dependency and -D to save to dev-dependency
-g can be used to install globally
Basic React installs
React: create-react-app <name> --use -npm
React/Redux: npm i -S redux react-redux
React-Router: npm i -S react-router-dom
Redux-Devtools Extension: npm i -S redux-devtools-extension
Redux-Thunk: npm i -S redux-thunk
Styling
SCSS: npm i -S node-sass-chokidar npm-run-all
Important scripts to include for using SCSS
"build-css": "node-sass-chokidar src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
"start": "npm-run-all -p watch-css start-js",
"build": "npm-run-all build-css build-js",
Testing
Mocha: npm i -D mocha
Enzyme: npm i -D enzyme enzyme-adapter-react-16
Prop Type: npm i -S prop-types
File Linting
Eslint: npm i -D eslint
Important scripts to use for eslint
"eslint": "./node_modules/eslint/bin/eslint.js ./src/**/**/*.js"
Unique Id generator
Uuid: npm i -S uuid
Test coverage: npm t -- --coverage
Create new React project with all dependencies
create-react-app <name> --use -npm
npm i -S redux react-redux react-router-dom redux-devtools-extension redux-thunk prop-types node-sass-chokidar npm-run-all uuid
npm i -D enzyme enzyme-adapter-react-16 eslint
If something is broken see if you need to update
brew install
@TwirlingTechGoddess
Copy link

this is beautiful

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