breezewish / express-minify

Automatically minify and cache your javascript and css files.
https://npmjs.org/package/express-minify
MIT License
86 stars 18 forks source link

NFR: Experimental branch for *UglifyJS2* #42

Closed Martii closed 8 years ago

Martii commented 8 years ago

Heyo again... still pondering on that last NFR but keep getting yanked in different directions... anyhow...

I was hoping to see if you could add a specific branch to express-minify that has:

"uglify-js": "git://github.com/mishoo/UglifyJS2#harmony"

... in that branches ./package.json to replace this line in order to let everyone test out mishoo/UglifyJS2#448 .

I've established a testing method on OpenUserJS and would like to easily switch between your primary release (npm of course) and a test branch on this GitHub repo.

Would this one liner with a branch creation be something you would be willing to do when you have a moment?

Thanks so much and have a good holiday if you are doing that sort of thing. :) OUJS Admin

Refs:

fabiosantoscode commented 8 years ago

I strongly feel the solution here is to allow users to pass their own uglifyjs instance. This would let them use any version they please.

Martii commented 8 years ago

I may end up forking this project just during the test period and bump the dep there (still testing ES5 minification and resource consumption)... haven't had much time to do much coding since New Years other than a few minor fixes here and there. I don't particularly like using git uri's in npm because they redownload the whole thing every npm install on our VPS instead of checking to see if there are changes... which is why I prefer the npm registry for package deps... but a short term is okay. I noticed a little while ago the harmony branch was sync'd with release which would have been my next request over there.

breezewish commented 8 years ago

I'm so sorry for the late reply. I was devoted to the school's stuff in the past several months and I haven't noticed this issue. I'm still deeply caught by exams currently and I will start dealing with this in a week. Thanks for your understanding!

Martii commented 8 years ago

@SummerWish No problem studies are important too... I was just asking to be courteous first... keeps things tidier and some projects informed. :)

breezewish commented 8 years ago

I released a new version and you can pass your own UglifyJS instance into express-minify now.

Martii commented 8 years ago

Kewl... Thanks. It's looking like I may have to make a new route though... I understand that the harmony branch is unstable but when two of the maintainers say there might be issues ... especially one with arrow functions... I might have to include UglifyJS2 directly as a dep and create a temporary route... but this will be good for local testing. Thanks again. :)

Martii commented 8 years ago

Also I'm going to need a dump log of the errors encountered so I can pass that along to them with the try...catch... so I guess I'll keep that fork around too.

Martii commented 8 years ago

Works here on the tested subset... I'll create a new NFR for a callback, or equivalent, for the error trap... currently it's set to "ignore" in this package.

fabiosantoscode commented 8 years ago

Be sure to report any crashes of uglifyjs on the harmony branch. File an issue and @mention me so I can find it in the sea of other issues, please!

I would appreciate it a lot :) it's been hard work getting es6 into uglifyjs

Martii commented 8 years ago

@fabiosantoscode You are looking at one of the noisiest developers out there here (me)... so I'll let you know for sure... just need to link in an error handler soon that was just added at SummerWish/express-minify#44

I can say if the error message is too vague on the harmony branch I will not be storing and distributing the full source code of the affected in a log as that can get HUGE for storage if a bunch of revisions come through. We are currently a presentational userscript repository so we don't have diffs and versions. I'm sure someone will try fill up our VPS logs like they tried on USO if I stored each revision... which is part of the reason why they had lots of downtime.