Skip to content

Script to add React library and dependencies to an existing project.

License

Notifications You must be signed in to change notification settings

leomunozr/setup-react-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Script to add React library and dependencies to an existing project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published