refcoffeeify
v0.7.0
Published
browserify v2 plugin for reflective coffee-script with support for mixed .js and .[ref]coffee files
Downloads
2
Maintainers
Readme
refcoffeeify
browserify v2 plugin for coffee-script
mix and match .coffee
and .js
files in the same project
This is a fork of 'coffeeify' that supports reflective-coffeescript transparently.
Your reflective-coffeescript files can have .coffee or .refcoffee extension.
example
given some files written in a mix of js
and coffee
:
foo.coffee:
console.log(require './bar.js')
bar.js:
module.exports = require('./baz.coffee')(5)
baz.coffee:
module.exports = (n) -> n * 111
install refcoffeeify into your app:
$ npm install refcoffeeify
when you compile your app, just pass -t refcoffeeify
to browserify:
$ browserify -t refcoffeeify foo.coffee > bundle.js
$ node bundle.js
555
you can omit the .coffee
extension from your requires if you add the extension to browserify's module extensions:
module.exports = require('./baz')(5)
$ browserify -t refcoffeeify --extension=".coffee" foo.coffee > bundle.js
$ node bundle.js
555
install
With npm do:
npm install refcoffeeify
license
MIT
[https://github.com/rev22/refcoffeeify/graphs/contributors](List of GitHub contributors)