Reputation:
There is a module that I want to try and make some changes to, for a test.
The code is here:
https://github.com/BTMorton/angular2-grid
Right now to install this in my project I just need to type: npm install angular2-grid from my terminal.
My question is:
If I downloaded the code from github and made some changes to it,
How do I install it in my product and test it if my test changes are not on npm repo?
Upvotes: 0
Views: 27
Reputation: 18836
Done!
import { NgGridModule } from './angular2-grid';
npm link
cd ~/projects/angular2-grid # go into the package directory (and edit and build)
npm link # creates global link
cd ~/projects/myProject # go into some other package directory.
npm link angular2-grid # link-install the package
npm install <git repo>
Fork and push changes to your repo and
npm install --save <your repo address>
example,
npm install --save https://github.com/YOURUSERNAME/angular2-grid
There are probably lot of other ways to deal with it. But these above will be enough for you.
Upvotes: 1
Reputation: 9240
You can install npm modules locally.
Just use npm install file:/path/to/your/repo
Alternately, you could fork the repo and then use a github link:
npm install github:yourname/angular2-grid.git
Upvotes: 0