зеркало из https://github.com/electron/electron.git
add programmatic usage
This commit is contained in:
Родитель
4708eba69e
Коммит
eb04836d51
|
@ -37,3 +37,19 @@ Then you can run your app using:
|
|||
```
|
||||
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)
|
||||
```
|
Загрузка…
Ссылка в новой задаче