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