GruntJS / NPM package.json: installing from local?

With GruntJS / NPM package.json

If I cloned a module from github to local, how can I refer to this in my package.json so that it installs from the local version?

+4
source share
1 answer

You can create a forked version of the source repo on Github and reference your Github URL in package.json . You can even specify a branch or tag while you wait for the upstream to accept any corrections you may have.

 "dependencies": { "my-task": "git://github.com/username/repo.git#branch" } 

Or you can use npm link to link to a project located on your hard drive. This works great if you're the only developer, but the deployment will be a little more complicated, no matter what. (option above if it is the best)

+4
source

All Articles