bin/cssmin

Summary

Maintainability
Test Coverage
#!/bin/bash
# cssmin
#
#{{IS_NOTE
#    Purpose:
#        Compile and compress CSS
#    Description:
#
#    History:
#        Nov 18 12:27:56 CST 2021, Created by jumperchen
#}}IS_NOTE
#
#Copyright (C) 2021 Potix Corporation. All Rights Reserved.
#
#{{IS_RIGHT
#    This program is distributed under GPL Version 3.0 in the hope that
#    it will be useful, but WITHOUT ANY WARRANTY.
#}}IS_RIGHT
#
nodeChecker=$(node -v)
if [ -z "$nodeChecker" ] ; then
    echo "please install node.js"
    exit 1
fi

maindir="$(pwd)"
cd "$1" || exit 1
shift

echo "CSS minify: Run Gulp on $maindir"
npx gulp -f gulpfile.js --cwd "$maindir" build:minify-css "$@"