mirror of
https://github.com/medialab-prado/datamad2017.git
synced 2024-12-26 12:41:23 +01:00
Script minification bash scripts are added.
This commit is contained in:
parent
5ab408316f
commit
7f25a9a22d
2 changed files with 21 additions and 0 deletions
17
automation/minifying/minify_js.sh
Executable file
17
automation/minifying/minify_js.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
FILES="../../js";
|
||||
else
|
||||
FILES=$1;
|
||||
fi
|
||||
|
||||
|
||||
for f in $FILES/*.js;
|
||||
do
|
||||
if [[ $f != *".min"* ]]; then
|
||||
echo "Processing $f ..."
|
||||
echo "java -jar yuicompressor-2.4.8.jar $f -o ${f%.js}.min.js"
|
||||
java -jar yuicompressor-2.4.8.jar $f -o ${f%.js}.min.js
|
||||
fi
|
||||
done
|
4
automation/minifying/minify_scripts_js.sh
Executable file
4
automation/minifying/minify_scripts_js.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Optimizing scripts.js to scripts.min.js"
|
||||
java -jar yuicompressor-2.4.8.jar ../../js/scripts.js -o ../../js/scripts.min.js
|
Loading…
Reference in a new issue