JS2Coffee
No description provided
Details
Installs
- Total 5K
- Win 1K
- Mac 3K
- Linux 1K
Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime JS2Coffee
A quick way to convert Javascript to Coffeescript without leaving Sublime Text 3.
Installation
- Install node and npm (js2coffee requires these)
- Install js2coffee and coffee-script:
npm install -g js2coffee coffee-script
(the actual converter) - Install the CoffeeScript Sublime Plugin for syntax highlighting
then, either
- Install Package Control if you don't already have it.
cmd-shift-p
Package Control: Install Package -> JS2Coffee
or
- Clone this repo into your
Packages
directory (Not Recommended: cloning will not allow you to update automatically).
Usage
cmd-shift-p
JS2Coffee:
The syntax will be automatically set to CoffeeScript, and either the current file will be replaced with the CoffeeScript convertion, or a new file will be opened containing the conversion (depending on the command you used).
Settings
{
"js2coffee_path": "/usr/local/bin/node /usr/local/bin/js2coffee",
"coffee_syntax_path": "Packages/Better CoffeeScript/CoffeeScript.tmLanguage"
}
Bind a Key Combination
Note: Out of courtesy, there is no keyboard shortcut set by default.
In Packages/User/Default (
your OS).sublime-keymap
add one of the following lines:
{ "keys": ["ctrl+shift+j"], "command": "js_coffee", "args":{"new_file": true}}
or
{ "keys": ["ctrl+shift+j"], "command": "js_coffee", "args":{"new_file": false}}
Troubleshooting
If js2coffee
outputs an error message it will show up in Sublime Text's console. There is not always useful context information in these messages, so YMMV.