mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
653 B
55 lines
653 B
12 years ago
|
editor
|
||
|
======
|
||
|
|
||
|
Launch $EDITOR in your program.
|
||
|
|
||
|
example
|
||
|
=======
|
||
|
|
||
|
``` js
|
||
|
var editor = require('editor');
|
||
|
editor('beep.json', function (code, sig) {
|
||
|
console.log('finished editing with code ' + code);
|
||
|
});
|
||
|
```
|
||
|
|
||
|
***
|
||
|
|
||
|
```
|
||
|
$ node edit.js
|
||
|
```
|
||
|
|
||
|

|
||
|
|
||
|
```
|
||
|
finished editing with code 0
|
||
|
```
|
||
|
|
||
|
methods
|
||
|
=======
|
||
|
|
||
|
``` js
|
||
|
var editor = require('editor')
|
||
|
```
|
||
|
|
||
|
editor(file, opts={}, cb)
|
||
|
-------------------------
|
||
|
|
||
|
Launch the `$EDITOR` (or `opts.editor`) for `file`.
|
||
|
|
||
|
When the editor exits, `cb(code, sig)` fires.
|
||
|
|
||
|
install
|
||
|
=======
|
||
|
|
||
|
With [npm](http://npmjs.org) do:
|
||
|
|
||
|
```
|
||
|
npm install editor
|
||
|
```
|
||
|
|
||
|
license
|
||
|
=======
|
||
|
|
||
|
MIT
|