Specifying your own github url in package.json



I read on here: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies

that I could specify my own github repo.

I added “nativescript-google-maps-sdk”: “randy-johnson/nativescript-google-maps-sdk#70089d0cc78f913f7828e680c7cfab2892a301b1”, to my package json

also tried this:

"nativescript-google-maps-sdk": "randy-johnson/nativescript-google-maps-sdk",

which is said would default to master.

that works in that it connects to github and pulls down files etc but it doesn’t get all of them.

It is missing the normal js files that exist when i use the npm version in my package.json

Screenshot of directory when I point to my github repo:


Screenshot of directory if I point to the npm by just specifying the version in package.json


Any ideas on what is going on here?

Thank You.



Could you show the content of your .npmignore file please? it may come from here :smile:




Is like


So here when you install the package from your github you will not get the files which correspond to the patterns set in your .npmignore that’s why you don’t have any of your .ts files.
But what you want is the .js files, in your .gitignore you ignore them so when you push to github you won’t have you js files and since you load your package from your github you won’t have them either.
The best solution to me is to change your .gitignore and remove *.js but don’t change your .npmignore and it should work :beers: