chieffancypants / angular-hotkeys

Configuration-centric keyboard shortcuts for your Angular apps.
http://chieffancypants.github.io/angular-hotkeys/
MIT License
1.68k stars 248 forks source link

Export name of the module rather than MouseTrap (usage with webpack) #239

Open Oza94 opened 8 years ago

Oza94 commented 8 years ago

Hello,

I'm using webpack with angular so I require() angular librairies. Angular and angular ui have a cool convention, when you require the module it returns its name (e.g. angular-resource for ngResource).

This allow using syntax such as

// cool syntax
angular.module('app', [require('angular-resource')]);

// i dont like this one
require('angular-resource');
angular.module('app', ['ngResource']);

Is there particular reason for angular-hotkeys to export MouseTrap object ?

sibelius commented 8 years ago

it is pretty easy to add commonjs/webpack support:

check this: https://github.com/lorenzofox3/Smart-Table/pull/429