summaryrefslogtreecommitdiff
path: root/scripts/make-assets.sh
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-15 19:13:49 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-15 19:13:49 -0400
commit6079233a07374e6a9f96ec57d5db6016e8939e1d (patch)
tree360a3921bfe12075bfc2a5a931721d9caf897b4d /scripts/make-assets.sh
parentcea32af4064d483b02f070db86a7a84d723bea81 (diff)
Add Makefile and remove the scripts directory
Diffstat (limited to 'scripts/make-assets.sh')
-rwxr-xr-xscripts/make-assets.sh66
1 files changed, 0 insertions, 66 deletions
diff --git a/scripts/make-assets.sh b/scripts/make-assets.sh
deleted file mode 100755
index 5aaaa0b6..00000000
--- a/scripts/make-assets.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-
-print_css="print links table board task comment subtask markdown"
-app_css="base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown screenshot filters gantt"
-vendor_css="jquery-ui.min jquery-ui-timepicker-addon.min chosen.min fullcalendar.min font-awesome.min c3.min"
-
-app_js="Popover Dropdown Tooltip Markdown Sidebar Search App Screenshot Calendar Board Swimlane Gantt TaskRepartitionChart UserRepartitionChart CumulativeFlowDiagram BurndownChart BudgetChart AvgTimeColumnChart TaskTimeColumnChart LeadCycleTimeChart Router"
-vendor_js="jquery-1.11.1.min jquery-ui.min jquery-ui-timepicker-addon.min chosen.jquery.min moment.min fullcalendar.min mousetrap.min mousetrap-global-bind.min app.min"
-lang_js="da de es fi fr hu it ja nl pl pt pt-br ru sv sr th tr zh-cn"
-
-function merge_css {
-
- local app_file="assets/css/app.css"
- local print_file="assets/css/print.css"
-
- rm -f $app_file 2>/dev/null
- rm -f $print_file 2>/dev/null
- echo "/* DO NOT EDIT: AUTO-GENERATED FILE */" > $app_file
- echo "/************************************/" >> $app_file
- echo "/* DO NOT EDIT: AUTO-GENERATED FILE */" > $print_file
- echo "/************************************/" >> $print_file
-
- for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $app_file; done
- for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $print_file; done
-
- for file in $app_css; do cat "assets/css/src/${file}.css" >> $app_file; done
- for file in $print_css; do cat "assets/css/src/${file}.css" >> $print_file; done
-}
-
-function minify_js {
-
- local tmp_file="assets/js/minify.js"
- local dst_file="assets/js/vendor/app.min.js"
-
- rm -f $dst_file $tmp_file 2>/dev/null
-
- echo "(function() { 'use strict';" > $tmp_file;
- for file in $app_js; do cat "assets/js/src/${file}.js" >> $tmp_file; done
- echo "})();" >> $tmp_file;
-
- curl -s \
- -d compilation_level=SIMPLE_OPTIMIZATIONS \
- -d output_format=text \
- -d output_info=compiled_code \
- --data-urlencode "js_code@${tmp_file}" \
- http://closure-compiler.appspot.com/compile > $dst_file
-
- rm -f $tmp_file 2>/dev/null
-}
-
-function merge_js {
-
- local tmp_file="assets/js/vendor/app.min.js"
- local dst_file="assets/js/app.js"
-
- rm -f $dst_file 2>/dev/null
-
- for file in $vendor_js; do cat "assets/js/vendor/${file}.js" >> $dst_file; done
- for file in $lang_js; do cat "assets/js/vendor/lang/${file}.js" >> $dst_file; done
-
- rm -f $tmp_file 2>/dev/null
-}
-
-merge_css
-minify_js
-merge_js