EvanHahn / HumanizeDuration.js

361000 becomes "6 minutes, 1 second"
https://evanhahn.github.io/HumanizeDuration.js/
The Unlicense
1.64k stars 175 forks source link

Its impossible Uglify #78

Closed dangercris closed 8 years ago

dangercris commented 9 years ago

Hi Dude, your code is awesome and Useful but is impossible minify and concat with another dependencies, can you make it possible?

EvanHahn commented 9 years ago

I have been able to minify and concat with no problem. What issues are you seeing?

EvanHahn commented 9 years ago

@dangercris What issues were you seeing when minifying?

dangercris commented 9 years ago

when I Uglify and Minify you code with angular dependencies and more the i have error with you library got undefined, the solution was Concat and minify with you library at the top of the main file an later other dependencies

EvanHahn commented 9 years ago

Could you create a gist that demonstrates your problem?

dangercris commented 9 years ago

The difference is in my first file I need put at the top you library and all work like a charm, but when I uglify my main file with your library in different order this got undefined :( https://gist.github.com/dangercris/0c257f747b0f4e9d40f8

EvanHahn commented 9 years ago

What is the error that you see?

dangercris commented 8 years ago

Your funciton got Undefinied

EvanHahn commented 8 years ago

Could this be because you're using Angular? Take a look at this: http://stackoverflow.com/a/24659782

EvanHahn commented 8 years ago

@dangercris Any updates on this?

jaf0 commented 8 years ago

angular.module('myApp').value('humanizeDuration', humanizeDuration);

then you can inject it

actually on closer inspection, you've got define.amd set, which only returns the humanizeDuration class... but you don't assign it to anything ?

EvanHahn commented 8 years ago

Alright to close this issue?

jaf0 commented 8 years ago

no connection to the OP, just wanted to get a little detail out there for posterity...

the issue is inactive for 4 months ... be my guest :+1:

EvanHahn commented 8 years ago

Closing for now. Feel free to continue discussion or open a new issue.

dangercris commented 8 years ago

@EvanHahn the ng-annotate was the solution thanks