Licence
MIT
Version
0.0.5
Deps
0
Size
7 kB
Vulns
0
Weekly
0
Setup React Project
Install React and it's dependencies and create the needed configuration files for Babel and Webpack.
Installation
npx @leomunozr/setup-react-project
Usage
In the root directory of the project you want to install React.
> setup-react
What's included?
Script will automatically install the dependencies for React:
- react
- react-dom
and the develpment dependencies for building the project:
- @babel/core
- @babel/preset-env
- @babel/preset-react
- babel-loader
- babel-plugin-transform-object-rest-spread
- css-loader
- style-loader
- webpack
- webpack-cli
- webpack-dev-server
You can use all ES6 features, including the spread operator ....
Scripts
npm scripts are added to package.json. If the package.json already contains scripts with the same name, they will be added with the prefix react-.
- start: opens the webpack-dev-server.
- prestart: compiles project using webpack.
- build: compiles project for production.