NodeEval
A Sublime Text Plugin that "evals" a selection/document with NodeJS
Details
Installs
- Total 3K
- Win 1K
- Mac 984
- Linux 491
May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 0 | 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
NodeEval Sublime Text 2 & 3 Package
Use the NodeJS binary to evaluate a document or selection(s) and print the results
Screenshots
Install
Installation via the Package Control (Search for NodeEval
)
To install manually clone this project into your Sublime Text 2\Packages
folder:
OSX
git clone git://github.com/mediaupstream/SublimeText-NodeEval.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/NodeEval
Windows
git clone git://github.com/mediaupstream/SublimeText-NodeEval.git "%APPDATA%\Sublime Text 2\Packages\NodeEval"
Usage
After installation you will have:
- Context Menu and
Tools
Menu items:NodeEval
- evaluate the current selection(s) / document withnode
NodeEval - Continuous (Toggle)
- Continually evaluate the current selection(s) / document withnode
. This command is a toggle for the current document / selection(s) only. You can set the refresh rate in the Sublime settings (see below)
- Default keyboard shortcuts:
ctrl+n,e
- Package Settings:
Preferences > Package Settings > NodeEval
{
// The absolute path to your nodejs executable
// e.g. "/usr/local/bin/node" or "C:\\bin\\node.exe"
"node_command": "/usr/local/bin/node",
// How to output the results, options include:
// - new [default] "send output to a new file"
// - console "send output to a new Panel (Console) view"
// - replace "overwrite the current file/selection with the output"
// - clipboard "there is no output, output copied to clipboard"
"output": "new",
// if output type is "new" the output is overwritten, set to false to append the output
"overwrite_output": true,
// if set to true the output is copied to the clipboard
// if `output` is set to "clipboard" this value is ignored
"copy_to_clipboard": false,
// refresh rate threshold for "continuous" mode (in milliseconds)
"threshold": 200,
// Set any extra ENVIRONMENT Variables as an object
// @example
// "env": {
// "NODE_PATH":"/path/to/node",
// "NODE_MODULES":"/path/to/node_modules"
// }
// @note: if you start sublime from a terminal using `subl` your normal environment
// variables should be available to you
"env": {}
}
The commands work on a selection, multiple selections or if nothing is selected the whole document. Your script will be eval'd through nodejs
in it's own thread.
Why not just use the NodeJS plugin, or the nodejsLauncher plugin ?
the NodeJS
plugin is awesome, but it's also really bloated. also the nodejsLauncher
only works on Windows.
Contributors
Derek Anderson
Shane Walker
Shesh
akira-cn
Jakub Gutkowski
License
MIT License