https://github.com/etcinit/reaction
Browserify and React.js wrapper for Gulp.js
https://github.com/etcinit/reaction
Last synced: about 1 year ago
JSON representation
Browserify and React.js wrapper for Gulp.js
- Host: GitHub
- URL: https://github.com/etcinit/reaction
- Owner: etcinit
- License: mit
- Archived: true
- Created: 2015-01-30T06:03:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-05T20:04:26.000Z (about 11 years ago)
- Last Synced: 2025-03-13T23:29:55.594Z (about 1 year ago)
- Language: JavaScript
- Size: 143 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reaction
A simple wrapper of Browserify and React for gulp.js
## Changes:
### 0.2.0: Switch to Babelify
- Instead of using react-tools, reaction now uses babelify. The options object
now passes configuration to babelify.
## Usage
First install it:
npm install --save react-reaction
Then, create a gulp task using it:
```js
// ...
var reaction = require('react-reaction'),
uglify = require('gulp-uglify');
// Process all JSX scripts
gulp.task('scripts', function () {
return gulp
.src(['./src/app.jsx'])
.pipe(reaction({
experimental: true,
playground: true,
comments: false
}))
.pipe(uglify()) // Optional
.pipe(gulp.dest('./public/js'));
});
```
## API
### reaction(options: Object): Object
Returns a vinyl-transform that will process JS/JSX files using
Browserify and React's transform. Any options are esentially just
passed down to Babel, so you can enable things like experimental language
features or generate a source map. See https://babeljs.io/docs/usage/options/
for more information.