0.0.2 • Published 9 years ago
react-build-lib v0.0.2
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
Install the package with either
yarnornpm:yarn add --dev react-build-lib npm install --save-dev react-build-lib # or use npmAdd the following script to your
package.jsonfile:"scripts": { "build:lib": "react-build-lib" }Now, everytime you run
npm run build:lib, babel will compile all your javascript files in yoursrcfolder and output alibfolder. 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