I wrote a Grunt task to essentially perform “npm install” when building a binary package. You might find it useful. The API for npm is not stellar.
https://github.com/blalor/grunt-prepare-install On Jan 18, 2014, at 7:07 AM, Kevin Ingwersen <[email protected]> wrote: > Hey! > > I am curios about something, that may be ultra useful for my package. Can I > invoke npm via node? > I was thinking somethin glike that: > > var npm = require(„npm“); > npm.install(„name“); > > In order to properly install a package I am coding, I need to install a .node > binary; and I would like to externalize these binaries some. > > Kind regards, Ingwie > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- Brian Lalor [email protected] -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
