Closed DamonOehlman closed 11 years ago
The use case doesn't quite make sense to me. Just add a package.json to the project :) npm doesn't support what you are trying to do because it is trivial to add a package.json
Sure no worries, case in point was me wanting to have a play with @mikolalysenko's raymarch when he first added it to github: https://github.com/mikolalysenko/raymarch/tree/207b709a686f99a2a9bb60d8103c6176fe1df4ec which was prior to the addition of a package.json file.
I agree that it's not something that happens often though...
I had a use case for required where I wanted to install all the modules required by a project that had not specified a
package.json
file. While I don't thinknpm install
supports reading from stdin, I would ideally love to be able to run something like the following in such a project:At this stage, required spits the dummy when it cannot find a referenced module on the filesystem (https://github.com/shtylman/node-required/blob/master/index.js#L62). Just wondering if you'd consider changing this behaviour or if it goes against your primary reason for creating the tool in the first place?
If not I'm happy to do make the change and send through a PR :)