1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/scripts/build-scss.sh

24 lines
651 B
Bash
Raw Normal View History

2016-05-14 12:27:05 +01:00
#!/usr/bin/env bash
set -e
2016-05-17 18:12:47 +01:00
if [ "$NODE_ENV" = "production" ]
2016-05-16 18:20:16 +01:00
then
echo ">>> WARNING: Building in Production Mode!"
fi
2016-05-14 12:27:05 +01:00
2016-05-23 17:38:13 +01:00
echo ">> Generating Pygments styles..."
2016-08-13 20:22:15 +01:00
pygmentize -S monokai -f html -a .highlight > theme/static/src/scss/pygment.css
2016-05-23 17:38:13 +01:00
2016-05-16 18:20:16 +01:00
echo ">> Building SCSS..."
2016-05-15 17:44:52 +01:00
node-sass theme/static/src/scss/index.scss theme/static/build/css/index.css --source-map-embed
2016-05-14 12:27:05 +01:00
2016-05-16 18:20:16 +01:00
echo ">> Post-Processing..."
postcss -u autoprefixer -o theme/static/build/css/index.css theme/static/build/css/index.css
2016-05-17 18:12:47 +01:00
if [ "$NODE_ENV" = "production" ]
2016-05-16 18:20:16 +01:00
then
echo ">> Compressing CSS..."
cleancss -d --s0 -o theme/static/build/css/index.css theme/static/build/css/index.css
fi