RyanMullins / angular-hammer

Hammer.js v2 support for AngularJS
http://ryanmullins.github.io/angular-hammer/
MIT License
188 stars 55 forks source link

Moving angular, hammerjs, and browerify-shim to production dependencies #31

Closed benhughes closed 9 years ago

benhughes commented 9 years ago

We're trying to use angular-hammer in our code base using browserify and having issues as the dependencies needed are not being downloaded when 'npm install' is executed due to them not being included as a production dependency.

This pull request will fix that.

RyanMullins commented 9 years ago

You should be including the dependencies in your package.json file, not relying on mine to load them in. This is common practice in other Angular plug-in projects (see Angular UI).

benhughes commented 9 years ago

If that's the case then you need to remove the browser part from the package.json file:

  "browser": {
    "angular": "./node_modules/angular/angular.js",
    "hammerjs": "./node_modules/hammerjs/hammer.js",
    "angular-hammer": "./angular.hammer.js"
  },

this is causing browserify to look for them in angular-hammer projects node_modules file instead of my projects dependencies

RyanMullins commented 9 years ago

That I can do

benhughes commented 9 years ago

Great. Thanks. Shall I create a new issue?

RyanMullins commented 9 years ago

Sure. I probably won't get to this today. Lots going on at work and preparing for a massive snow storm.

benhughes commented 9 years ago

No rush, I'm pulling it from my fork at the moment anyway. I'll create a new pull request.

Thanks for your hard work on this repo. Making my life alot easier :smile: