1

I like to install module AngularDevise (https://github.com/cloudspace/angular_devise) into an ionic project. But the module is not in the npm registry. So far I've tried several hints suggested in How to install a private NPM module without my own registry?.

The following command

npm install -S "https://github.com/cloudspace/angular_devise.git"

seems to modify the package.json file:

diff --git a/mobile/package.json b/mobile/package.json
@@ -3,11 +3,12 @@
   "version": "1.1.1",
   "description": "mobile: An Ionic project",
   "dependencies": {
+    "AngularDevise": "git+https://github.com/cloudspace/angular_devise.git",
     "gulp": "^3.5.6",

Still, I don't see any files from AngularDevise installed in the local project directory. What is the right way to install the *.js files locally?

Any suggestion is greatly appreciated.

Community
  • 1
  • 1
builder
  • 251
  • 4
  • 11
  • AngularDevise is registered as angular-devise in bower: `bower install --save angular-devise`. https://github.com/cloudspace/angular_devise#downloading – stdob-- Feb 23 '16 at 03:05
  • @stdob: Does Ionic require that you use bower? If not, I'd recommend avoiding using a second package manager in a single project. It just makes a mess of things. – Andrew Feb 23 '16 at 03:15
  • @Andrew: You're right. I first tried `bower install` in the ionic project and created a mess. Thanks to `git`, the cleanup wasn't too bad. – builder Feb 23 '16 at 04:13

1 Answers1

1

Since I am not familiar with folder structure that ionic uses, please just use your own knowledge of where dependencies should go.

My suggestion would be to use git submodules, you can even put the project into node_modules folder and make an exception in your .gitignore to commit that folder (you only need an empty folder when working with submodules so .gitkeep will suffice).

All you need to do then is update your submodules with a git command. It is an extra step but it works well when the module is not tracked by npm.

Dmitry Matveev
  • 5,320
  • 1
  • 32
  • 43