Minify javascript
This commit is contained in:
634
assets/js/app.js
634
assets/js/app.js
File diff suppressed because one or more lines are too long
@@ -84,7 +84,7 @@ var Kanboard = (function() {
|
|||||||
dataType: "html",
|
dataType: "html",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
"text": textarea.val()
|
"text": textarea.val()
|
||||||
}),
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
request.done(function(data) {
|
request.done(function(data) {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ Kanboard.Board = (function() {
|
|||||||
"task_id": taskId,
|
"task_id": taskId,
|
||||||
"column_id": columnId,
|
"column_id": columnId,
|
||||||
"swimlane_id": swimlaneId,
|
"swimlane_id": swimlaneId,
|
||||||
"position": position,
|
"position": position
|
||||||
}),
|
}),
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$("#board").remove();
|
$("#board").remove();
|
||||||
|
|||||||
@@ -1,20 +1,38 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
css="base links title table form button alert tooltip header board project task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive font-awesome.min jquery-ui-1.10.4.custom chosen.min"
|
css="base links title table form button alert tooltip header board project task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive font-awesome.min jquery-ui-1.10.4.custom chosen.min"
|
||||||
js="jquery-1.11.1.min jquery-ui-1.10.4.custom.min jquery.ui.touch-punch.min chosen.jquery.min base board task analytic init"
|
js="jquery-1.11.1.min jquery-ui-1.10.4.custom.min jquery.ui.touch-punch.min chosen.jquery.min minify.min"
|
||||||
|
minify="base board task analytic init"
|
||||||
|
|
||||||
|
rm -f assets/js/minify* 2>/dev/null
|
||||||
|
rm -f assets/js/app.js 2>/dev/null
|
||||||
|
rm -f assets/css/app.css 2>/dev/null
|
||||||
|
|
||||||
rm -f assets/css/app.css
|
|
||||||
echo "/* DO NOT EDIT: auto-generated file */" > assets/css/app.css
|
echo "/* DO NOT EDIT: auto-generated file */" > assets/css/app.css
|
||||||
|
|
||||||
|
# merge css
|
||||||
for file in $css
|
for file in $css
|
||||||
do
|
do
|
||||||
cat "assets/css/${file}.css" >> assets/css/app.css
|
cat "assets/css/${file}.css" >> assets/css/app.css
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f assets/js/app.js
|
# minify
|
||||||
echo "/* DO NOT EDIT: auto-generated file */" > assets/js/app.js
|
for file in $minify
|
||||||
|
do
|
||||||
|
cat "assets/js/${file}.js" >> assets/js/minify.js
|
||||||
|
done
|
||||||
|
|
||||||
|
curl -s \
|
||||||
|
-d compilation_level=SIMPLE_OPTIMIZATIONS \
|
||||||
|
-d output_format=text \
|
||||||
|
-d output_info=compiled_code \
|
||||||
|
--data-urlencode "js_code@assets/js/minify.js" \
|
||||||
|
http://closure-compiler.appspot.com/compile > assets/js/minify.min.js
|
||||||
|
|
||||||
|
# concat app.js
|
||||||
for file in $js
|
for file in $js
|
||||||
do
|
do
|
||||||
cat "assets/js/${file}.js" >> assets/js/app.js
|
cat "assets/js/${file}.js" >> assets/js/app.js
|
||||||
done
|
done
|
||||||
|
|
||||||
|
rm -f assets/js/minify* 2>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user