A JavaScript to CoffeeScript compiler
require('js2coffee')
npm install --save js2coffee
require('js2coffee')
npm install --save js2coffee
//wzrd.in/bundle/js2coffee@0.3.1
require('js2coffee')
ender add js2coffee
npm install -g js2coffee
Use:
js2coffee input_file.js
js2coffee input_file.js > output.coffee
cat input.js | js2coffee
You can pass some options:
--version # Show js2coffee version
--verbose # Be verbose
--no_comments # Do not translate comments
--show_src_lineno # Show src lineno's as comments
--single_quotes # Use single quoted string literals - default double quoted
--help # If you need help
--indent # Specify the indent character(s) - default 2 spaces
js2coffee = require('js2coffee');
coffeeContent = js2coffee.build(jstContent, {show_src_lineno: true, indent: " "});
require('js2coffee').build(content, options)
, arguments:
Js2coffee has some kown issues
js2coffee.org
You can swtich the mode (JS -> Coffee and Coffee -> JS) at the top in the center.
Discover the change history by heading on over to the HISTORY.md
file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Licensed under the incredibly permissive MIT license
Copyright © 2011+ Rico Sta. Cruz hi@ricostacruz.com (http://ricostacruz.com)
Made possible thanks to the hard work of Js2coffee's dependency projects:
And of course: