add programmatic usage
This commit is contained in:
parent
4708eba69e
commit
eb04836d51
1 changed files with 16 additions and 0 deletions
|
@ -37,3 +37,19 @@ Then you can run your app using:
|
||||||
```
|
```
|
||||||
atom-shell your-app/
|
atom-shell your-app/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Programmatic usage
|
||||||
|
|
||||||
|
If you require `atom-shell` inside your node app it will return the file path to the binary.
|
||||||
|
Use this to spawn atom shell
|
||||||
|
|
||||||
|
``` js
|
||||||
|
var atom = require('atom-shell')
|
||||||
|
var proc = require('child_process')
|
||||||
|
|
||||||
|
// will something similar to print /Users/maf/.../Atom
|
||||||
|
console.log(atom)
|
||||||
|
|
||||||
|
// spawn atom-shell
|
||||||
|
var child = proc.spawn(atom)
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue