You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pdfkit/node_modules/coffeeify
Matthew Butterick 3f36e2ce2c porting 7 years ago
..
example porting 7 years ago
node_modules porting 7 years ago
test porting 7 years ago
.npmignore porting 7 years ago
.travis.yml porting 7 years ago
LICENSE porting 7 years ago
index.js porting 7 years ago
package.json porting 7 years ago
readme.markdown porting 7 years ago

readme.markdown

coffeeify

browserify v2 plugin for coffee-script

mix and match .coffee and .js files in the same project

Build Status

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 coffeeify into your app:

$ npm install coffeeify

when you compile your app, just pass -t coffeeify to browserify:

$ browserify -t coffeeify 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 coffeeify --extension=".coffee" foo.coffee > bundle.js
$ node bundle.js
555

install

With npm do:

npm install coffeeify

license

MIT