Use npm for package-specific projects?


I have several packages that share one module. I’ve been accessing the github repo directly using "some-module": "mark-hahn/some-submodule" as a dependency in package.json. That is broken at the moment in APM and will be fixed soon. So I have to wait until then to update my package.

However, it has always bothered me to access github directly from package.json. Is it kosher to put a submodule in NPM that is only for my packages? No one else would ever use it. I know I could get away with it but is it cool?

Edit: Or is there another way to share a module between packages?


If the module you’re sharing is open source, then why not publish it to npm? I’m sure there are plenty of packages (including maybe one of mine :laughing:) that are there specifically for this purpose.


I’d say publish it to NPM, just because it might be useful to someone else.


I also just found this:

It appears to be a way they’re testing out to publish stuff into personal namespaces so that you don’t clutter the global package namespace with things that are just for you. (Or keep things private for you or your organization.)


I wasn’t able to tell for sure, but it may be that by private they mean only signed-in users can access them. Otherwise they would be public. I need public for atom packages.


Ah, good point. I hadn’t thought it through.