README
react-native-coffee
Setup
- Install dependencies via npm:
npm i --save-dev gulp react-native-coffee
- Create a Gulpfile.coffee
gulp = require 'gulp'
require 'react-native-coffee'
gulp.task 'default', ['watch']
Delete index.ios.js
Create index.ios.coffee. Put your app in there.
Run
gulp
to bootstrap your compilation.From now on, after you run
react-native run-ios
, rungulp
. Coffeescript should ensue each time you make a change to your.coffee
files.
Why
Most approaches to adding Coffeescript to React Native require you to do some kind of boilerplate setup where you clone someone's project and then make your modifications to that.
This approach has some drawbacks, including:
- clunky to change lots of minor things that the boilerplate includes (source control bindings, authors, project names)
- difficult to update/upgrade as upstream dependencies change
This package makes it a litle simpler to add turnkey coffeescript compilation to a React Native project, assuming you don't want to modify the build process much.
Thanks to ReactNativeCoffee for inspiration/code samples
Todo
- Add support for Android