I’d like to add an npm package, and I’ve been looking into Meteorhacks’ npm package, is this currently the best (=recommended) way to add npm packages to a meteor project?
That’s probably the easiest way but I prefer the official way:
Mega simple example based on Maxpain177s work: https://github.com/benjick/meteor-steam-bot
Where would add the “Npm.depends” ?
Must I divide my project into packages (like one of the methods of folder structures) in order to write that inside the package.js or is there an alternative in case i’m using the classic
server/ folder structure?
Yes, if you want to use Npm.depends you have to make it into a package.
While in your project directory type
meteor create --package my-package meteor add my-package
Example output from my current project:
C:\dev\infoAdmin>meteor create --package my-package my-package: created in packages\my-package C:\dev\infoAdmin>meteor add my-package Changes to your project's package version selections: my-package added, version 0.0.1 my-package C:\dev\infoAdmin>