A simple react boilerplate with webpack hmr and latest babel packages. It comes with inbuilt Travis-CI for PR checks, lint checks and builds. Kick start the development with tailwind css, react hooks and much more. It comes with an inbuild typescript support. So you dont have to worry anymore to add typescript files to your project.
This React Boilerplate works on macOS, Windows, and Linux.
If something doesn’t work, please file an issue.
git clone https://github.com/udaypydi/react-simple-boilerplate.git
cd my-app
yarn install
npm run dev
Then open http://localhost:9000/ to load your app.
When you’re ready to deploy to production, create a minified bundle with npm run build
.
You don’t need to install or configure tools like webpack or Babel.
They are reconfigured and hidden so that you can focus on the code.
Clone the project, and you’re good to go.
You’ll need to have Node 10.16.0 or higher version on your local development machine. You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.
To create a new app, you should clone this repository using the following command:
git clone https://github.com/udaypydi/react-simple-boilerplate.git my-app
It will create a directory called my-app
inside the current folder.
Inside that directory, it will generate the initial project structure.
No configuration or complicated folder structures, only the files you need to build your app.
Once the installation is done, you can open your project folder:
cd my-app
Inside the newly created project, you can run some built-in commands:
It will install all the packages that are required for project to up and running
Runs the app in development mode.
Open http://localhost:9000 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.
Runs the test watcher in an interactive mode.
By default, runs tests related to files changed since the last commit.
Runs the eslint over the src
dir. You get a list of list errors and warnings if any.
Run this command to autofix eslint issues. All the autofixable issues will be fixed.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed.
This website is built using Docusaurus 2, a modern static website generator.
$ yarn
$ yarn start
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
$ yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages
branch.