Is there a way to tell npm from the command line to use a different file than "package.json"?
Edit:
Thank you for your answers. I already checked the docs and hoped there was a workaround or a non-documented way to achieve that. I'll think of something else then.
Using only client-space tools, it seems pretty straightforward you can't. npm doc is positive about this :
source : npm doc
As you can see, they make it really clear a
package.json
is required for anything to work.You'd have to dig into the code, for a result which would not be reusable. If it's what you want, please make it clear in your question for others to understand why it's necessary.
Nope. As described in the
npm-install
docs, this is the only syntaxes you can use :With no args, the command will install
a folder containing a program described by a package.json file
.