Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Wack61918yI usually don't compress JS on my dev staging (VM, powered by Vagrant). The compression is only added on prod environement. Not sure what you are using, since you tagged PHP have a look at your framework. For example with Symfonys asset management you can simply add a `?` to the asset filter to not use it on dev environement!
-
Wombat102448y@pascalwacker thanks for the advice.
Actually I am including js-files in one php file and buffer output, those containing different functions I use an some pages. I compress the ouput by regex and print it in the requested file.
Actually its no problem for me to comment that line out. But when that happens and I look into the console it makes me grrr... ^^ -
Wack61918y@Divisionbyzero I usually use https://github.com/mishoo/UglifyJS with my projects (there's also a version for CSS). I don't really see the value you get by writing another minifyer plus it's easy to make a mistake or compress something the wrong way (assuming you also rename variables/uglify in the process)
-
Wombat102448y@pascalwacker I heard this 'why invent the qheel twice' speech, but all I do is for learning.
-
Wack61918y@Divisionbyzero then it's absolutely legit! That's the right spirit! Good luck with it (:
-
thoxx19778y@pascalwacker
UglifyJS Version 1 is a bit outdated ;-)
Link to Version 2:
https://github.com/mishoo/UglifyJS2
Related Rants
Minifiing js-script in one line...
... Error in Line 1:5363.
undefined
javascript
optimization
error
php