Search code examples
node.jsshelljs

shelljs to execute a shell script part of npm module


I am creating a a little nodejs based cli. What I require is ability to call a shell script thats part of my npm module (thats pushed to a npm registry).

I was looking at shelljs and I found it could execute scripts from the file system. However I am looking at something like shell.execute(require('./execute.sh')).

Is there a way to accomplish this


Solution

  • Ended up using get-installed-path to the path of the shell script within the bundle.