siddii / angular-timer

re-usable/inter-operable AngularJS timer directive ⛺
http://siddii.github.io/angular-timer/
MIT License
790 stars 938 forks source link

Allow use without localisation dependencies #191

Open startswithaj opened 9 years ago

startswithaj commented 9 years ago

Version 1.2.0 didn't require Moment+locales or humanize-duration.

162K moment-with-locales.min.js 14K humanize-duration.js

176k just for deps (this is enormous for a single timer directive)

Moment alone is only 34K (moment.min.js). (Nearly the size of jquery)

Would it be difficult to have this directive check for those dependencies first and if they don't exist move on? I18n support is great in many use cases don't require it and 176k user for most that don't need it so could it be optional?

siddii commented 9 years ago

Yes, I've been wanting to do it. It doesn't make sense to have those dependencies for non-majority use cases. I'll see if I can clean it up.

Feel free to send a PR if you lend hands :)