0.0.5 • Published 5 years ago
@leomunozr/setup-react-project v0.0.5
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.