AteaApps React App Generator
A custom create-react-app script inspired by the blog post: https://medium.com/@chrisjpatty/extending-create-react-app-to-make-your-own-app-generator-5d7b1ddc246
The template includes basic packages such as react-router, redux, axios and also an example how to use them. It also includes eslint and prettier as dev dependencies.
Requirements
- Node version >= 8.10.0
- NPM version >= 5.2.0
Configure ESLint and Prettier for VSCode
- Launch VS Code Quick Open (CMD+P for mac) and (Ctrl+P for windows)
- Run the following command
ext install dbaeumer.vscode-eslint
- Add the following to VSCodes settings.json
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
VScode will now check for lint errors and will correct them and format your code whenever you save. You can also run eslint manually with scripts.
For checking lint errors:
npm run lint
For fixing lint errors and formatting code:
npm run format
Creating a React App
npx
The easiest way is to use npx, you don't need to clone the repo for that. Just run this command in your terminal:
npx ateaapps-cra myapp
Manually
Clone this repo and then run:
npm install
npm link
ateaapps-cra myapp
You should now have your project folder inside the repo folder.