Search code examples
reactjsbrowserify

Browserify: Can't seem to get reactify to work with coffeeify


I can't seem to get reactify to work with coffeeify. I followed the Reactify's readme to no avail.

app.coffee

### @jsx React.DOM ###

console.log 'hi'

browser command:

browserify -t coffeeify -t [ reactify -x coffee] ./src/coffeescripts/app.coffee                                               
/Users/mueller.128/repos/klc/react_colorpicker/src/coffeescripts/app.coffee:1
/** @jsx React.DOM */
^
ParseError: regular expressions cannot begin with `*`

my attempt at using the browserify api in a gulp task

var browserify = require('browserify');
var source     = require('vinyl-source-stream');
var watchify   = require('watchify');
var coffeeify  = require('coffeeify');
var reactify   = require('reactify');


gulp.task('browserify', function() {
  return browserify('./src/coffeescripts/app.coffee')
    .transform({ }, coffeeify)
    .transform({ extension: "coffee" }, reactify)
    .bundle({debug: true})
    .pipe(source('./src/bundle.js'))
    .pipe(gulp.dest('./build/javascripts/'));
});

Thanks for any help.


Solution

  • browserify -t coffeeify -t [ reactify -x] ./app.coffee