paolobenve / myphotoshare

MOVED TO GITLAB! --- A Web 2.0 Photo Gallery Done Right via Static JSON, Dynamic Javascript and a bit of php for sharing
15 stars 0 forks source link

Add the option to use local CSS and JavaScript minifiers instead of web services #63

Closed pmetras closed 6 years ago

pmetras commented 6 years ago

Issue https://github.com/paolobenve/myphotoshare/issues/60

This version changes the js-css-minify.sh script to let the user decide which minifiers to use. I've added the new options minify_css and minify_js in the myphotoshare.conf.defaults file where the user can select to use the default web services (options value web_service) or the name of a local minifier. For the moment, only cssmin, jsmin2 and jsmin3 Python scripts that are available as Debian/Ubuntu packages are supported, but new ones can easily be added in the js-css-minify.sh script. The resulting minified files from using cssminand jsmin3 are larger than when using the web services, but the minifying operation takes less time and is less prone to timeouts.

pmetras commented 6 years ago

I've added checks that local minifiers are installed or web services are available.

paolobenve commented 6 years ago

I've added a parameter to js-css-minify.sh because the use can have more than one config file, and besides that, it could happen that the user do not specify the option in its config file, and in this case the project's config file must be used

paolobenve commented 6 years ago

@pmetras Your work was valuable! thank you very much!