replaced YUI compressor

This commit is contained in:
Roland Gruber 2017-04-02 15:35:06 +02:00
parent fb1ab48b38
commit dd17435a20
3 changed files with 15 additions and 15 deletions

View File

@ -25,11 +25,7 @@ function minify {
echo "Minify JS files in $dir" echo "Minify JS files in $dir"
local files=`ls $dir/*.js` local files=`ls $dir/*.js`
for file in $files; do for file in $files; do
# skip dropmenu file, incompatible with YUI compressor closure-compiler --charset UTF-8 --js file --js_output_file ${file}-MIN
if [[ $file =~ .*dropmenu.* ]]; then
continue
fi
yui-compressor --nomunge --preserve-semi --disable-optimizations --charset UTF-8 -o ${file}-MIN $file
rm $file rm $file
mv ${file}-MIN $file mv ${file}-MIN $file
# add final new line to supress Debian warnings # add final new line to supress Debian warnings
@ -43,7 +39,7 @@ function minifyCSS {
echo "Minify CSS files in $dir" echo "Minify CSS files in $dir"
local files=`ls $dir/*.css` local files=`ls $dir/*.css`
for file in $files; do for file in $files; do
yui-compressor --nomunge --preserve-semi --disable-optimizations --charset UTF-8 -o ${file}-MIN $file cleancss -o ${file}-MIN $file file
rm $file rm $file
mv ${file}-MIN $file mv ${file}-MIN $file
# add final new line to supress Debian warnings # add final new line to supress Debian warnings
@ -105,7 +101,7 @@ perl -pi -e "s/\\@\\@VERSION\\@\\@/$VERSION/g" configure.ac
autoconf autoconf
rm -r autom4te.cache rm -r autom4te.cache
cd .. cd ..
# Debian gets orig.tar.bz2 with original JS files # Debian gets orig.tar.bz2 with original JS files
tar cfj ldap-account-manager-$VERSION.tar.bz2 --owner=root --group=root --mtime=now ldap-account-manager-$VERSION tar cfj ldap-account-manager-$VERSION.tar.bz2 --owner=root --group=root --mtime=now ldap-account-manager-$VERSION
mv ldap-account-manager-$VERSION.tar.bz2 Debian/ldap-account-manager_$VERSION.orig.tar.bz2 mv ldap-account-manager-$VERSION.tar.bz2 Debian/ldap-account-manager_$VERSION.orig.tar.bz2
cp -ar ldap-account-manager-$VERSION Debian/ cp -ar ldap-account-manager-$VERSION Debian/
@ -125,7 +121,7 @@ perl -pi -e "s/\\@\\@VERSION\\@\\@/$VERSION/g" configure.ac
autoconf autoconf
rm -r autom4te.cache rm -r autom4te.cache
cd .. cd ..
# Debian gets orig.tar.bz2 with original JS files # Debian gets orig.tar.bz2 with original JS files
tar cfj ldap-account-manager-$VERSION.tar.bz2 --owner=root --group=root --mtime=now ldap-account-manager-$VERSION tar cfj ldap-account-manager-$VERSION.tar.bz2 --owner=root --group=root --mtime=now ldap-account-manager-$VERSION
mv ldap-account-manager-$VERSION.tar.bz2 Debian/ldap-account-manager_$VERSION.orig.tar.bz2 mv ldap-account-manager-$VERSION.tar.bz2 Debian/ldap-account-manager_$VERSION.orig.tar.bz2
cp -ar ldap-account-manager-$VERSION Debian/ cp -ar ldap-account-manager-$VERSION Debian/

View File

@ -3,7 +3,7 @@ Maintainer: Roland Gruber <post@rolandgruber.de>
Section: web Section: web
Priority: extra Priority: extra
Standards-Version: 3.9.8 Standards-Version: 3.9.8
Build-Depends: debhelper (>= 7), po-debconf, yui-compressor Build-Depends: debhelper (>= 7), po-debconf, cleancss, closure-compiler
Homepage: https://www.ldap-account-manager.org/ Homepage: https://www.ldap-account-manager.org/
Package: ldap-account-manager Package: ldap-account-manager

View File

@ -2,17 +2,21 @@
set -e set -e
files=`ls templates/lib/*.js style/*.css` files=`ls templates/lib/*.js`
for file in $files; do for file in $files; do
# skip dropmenu file, incompatible with YUI compressor closure-compiler --charset UTF-8 --js file --js_output_file ${file}-MIN
if [[ $file =~ .*dropmenu.* ]]; then
continue
fi
yui-compressor --nomunge --preserve-semi --disable-optimizations --charset UTF-8 -o ${file}-MIN $file
rm $file rm $file
mv ${file}-MIN $file mv ${file}-MIN $file
# add final new line to supress Debian warnings # add final new line to supress Debian warnings
echo "" >> $file echo "" >> $file
done done
files=`ls style/*.css`
for file in $files; do
cleancss -o ${file}-MIN $file file
rm $file
mv ${file}-MIN $file
# add final new line to supress Debian warnings
echo "" >> $file
done