diff --git a/npm/README.md b/npm/README.md index cd8b8eca38c9..04e7c53c90fa 100644 --- a/npm/README.md +++ b/npm/README.md @@ -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) +``` \ No newline at end of file