jack e1a2621c78 update | 2 years ago | |
---|---|---|
.. | ||
node_modules | 2 years ago | |
out | 2 years ago | |
testing | 2 years ago | |
.js | 2 years ago | |
.npmignore | 2 years ago | |
LICENSE.md | 2 years ago | |
README.md | 2 years ago | |
_Cakefile | 2 years ago | |
browser.js | 2 years ago | |
cyclic.js | 2 years ago | |
diff.coffee | 2 years ago | |
docpad.coffee | 2 years ago | |
horible.js | 2 years ago | |
js2coffee-buglist.txt | 2 years ago | |
js2coffee.iml | 2 years ago | |
latest-narcissus.coffee | 2 years ago | |
package.json | 2 years ago | |
test.coffee | 2 years ago | |
test0r.coffee | 2 years ago | |
test2.coffee | 2 years ago | |
test3.js | 2 years ago | |
testout.coffee | 2 years ago |
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: