danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
141 stars 61 forks source link

Exclude moment from the library #49

Closed rogyvojevic closed 4 years ago

rogyvojevic commented 4 years ago

Hey,

Recently I found out that moment is including a lot of stuff I do not need because I'm not using moment for the i18n. And as I saw anyone can add an adapter I decided to help out a little it and make a PR to completely remove moment from the package.

Here are some screenshots before and after. I literally saved 100kb+ :scream:

With moment included by default. with-moment

Without moment. without-moment

jcompagner commented 4 years ago

We do use moment, I am fine that I need to include this adapter my self as an extra package but I do hope we keep it simple and just don't fully remove it..

No I don't like the option to copy some code. That suddenly means all kind of forks..

rogyvojevic commented 4 years ago

Sure, no problem. I'll try to think of a better solution. To keep it but not to bundle it with all those locales, hopefully :smile:

I will close this PR :+1: