I am writing a node package and I need to copy some files that are included in the package. But I can't find a way to get the path to the npm package. How can I get it?
have you looked at __dirname
? Here are the docs: http://nodejs.org/api/globals.html#globals_dirname
You can use the __dirname
variable from a module to derive the location of other packages.