Browse Source

Minify target files by compressor, add test files

Volodymyr Tkach 2 years ago
parent
commit
906ed5ebf2
3 changed files with 8 additions and 0 deletions
  1. 8 0
      assets.sh
  2. 0 0
      test/test.css
  3. 0 0
      test/test.dev.css

+ 8 - 0
assets.sh

@@ -49,3 +49,11 @@ while read line; do
         echo "${line}" >> ${TARGET_FILE}
     fi
 done < ${SOURCE_FILE}
+
+# Minify target file (CSS, JS)
+# Install yui-compressor by command:
+# sudo apt-get install yui-compressor
+CHECK_YUI_COMPRESSOR=$(command -v yui-compressor 2> /dev/null)
+if [[ "${CHECK_YUI_COMPRESSOR}" != "" ]]; then
+    yui-compressor ${TARGET_FILE} -o ${TARGET_FILE}
+fi

+ 0 - 0
test/test.css


+ 0 - 0
test/test.dev.css