Simple boilerplate for React apps based on create-react-app include scss modules
No configuration or complicated folder structures, just the files you need to build your app.
Once the installation is done, you can run some commands inside the project folder:
Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
Runs the test watcher in an interactive mode. By default, runs tests related to files changed since the last commit.
You can want to use Docker for production. For this should use following commands:
- build image
docker build . -t react_skeleton
- run container
docker run -p 8080:80 react_skeleton
version: '2'
services:
react_skeleton:
container_name: react_skeleton
build: <folder path to Dockerfile>
ports:
- "8080:80"
Run linters against staged git files and don't let ๐ฉ slip into your code base!
Seelint-staged
###Prettier
See.
This boilerplate include auto formatting code before each git commit
You can change rules for formatting just edit .prettierrc
or you can remove this feature remove from package.json
"lint-staged": {
"*.{js,jsx}": [
"prettier --config .prettierrc --write",
"git add"
]
},