minify JS files
This commit is contained in:
parent
c0a4fecfec
commit
dc4c045201
|
@ -3,7 +3,7 @@ Maintainer: Roland Gruber <post@rolandgruber.de>
|
|||
Section: web
|
||||
Priority: extra
|
||||
Standards-Version: 3.9.5
|
||||
Build-Depends: debhelper (>= 7), po-debconf
|
||||
Build-Depends: debhelper (>= 7), po-debconf, yui-compressor
|
||||
Homepage: https://www.ldap-account-manager.org/
|
||||
|
||||
Package: ldap-account-manager
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
dir="templates/lib"
|
||||
files=`ls $dir/*.js`
|
||||
for file in $files; do
|
||||
# skip dropmenu file, incompatible with YUI compressor
|
||||
if [[ $file =~ .*dropmenu.* ]]; then
|
||||
continue
|
||||
fi
|
||||
yui-compressor --nomunge --preserve-semi --disable-optimizations --charset UTF-8 -o ${file}-MIN $file
|
||||
rm $file
|
||||
mv ${file}-MIN $file
|
||||
# add final new line to supress Debian warnings
|
||||
echo "" >> $file
|
||||
done
|
||||
|
||||
|
|
@ -11,9 +11,7 @@ build: build-arch build-indep
|
|||
build-arch: build-stamp
|
||||
|
||||
build-indep: build-stamp
|
||||
yui-compressor --nomunge --preserve-semi --disable-optimizations --charset UTF-8 -o templates/lib/500_lam.js-TMP templates/lib/500_lam.js
|
||||
rm templates/lib/500_lam.js
|
||||
mv templates/lib/500_lam.js-TMP templates/lib/500_lam.js
|
||||
minify
|
||||
|
||||
build-stamp:
|
||||
|
||||
|
|
Loading…
Reference in New Issue