Skip to content

A simple utility for compiling your React components to CommonJS modules.

Notifications You must be signed in to change notification settings

adrianmcli/react-build-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-build-lib

A simple utility for compiling your React components to CommonJS modules.

Ideally, you should never need to touch Webpack and Babel if all you want to do is to make and publish React components.

This utility uses Babel presets: react, latest, and stage-3.

How to use

  1. Install the package with either yarn or npm:
yarn add --dev react-build-lib
npm install --save-dev react-build-lib  # or use npm
  1. Add the following script to your package.json file:
"scripts": {
  "build:lib": "react-build-lib"
}
  1. Now, everytime you run npm run build:lib, babel will compile all your javascript files in your src folder and output a lib folder. By default, it will also copy over any other files.

Note: You can also set your source and ouput directories by providing two additional arguments:

react-build-lib src lib

Also see

React Build Dist

About

A simple utility for compiling your React components to CommonJS modules.

Resources

Stars

Watchers

Forks

Packages

No packages published