Skip to content

Instantly share code, notes, and snippets.

@therg
Last active August 29, 2015 14:03
Show Gist options
  • Save therg/6f4f9444170d5155f9e6 to your computer and use it in GitHub Desktop.
Save therg/6f4f9444170d5155f9e6 to your computer and use it in GitHub Desktop.
Cactus v3 Sass compiler
{
"prettify": true,
"ignore": ["css/*.scss"]
}
import os
# - This was written for Cactus v3 (https://github.com/koenbok/Cactus/tree/v3/cactus)
# - Sass is expected to be installed on the system.
# - This works without the current static template tag warnings.
# that .css doesn't exist since it runs with preBuild compiling
# the sass files in place.
# - The ignore pattern in config will prevent Cactus from moving
# Sass files to the build directory. Change to .sass if using other
# syntax.
# - Caveat is the .css files will remain in the static directory.
def preBuild(site):
os.system('sass -t compressed --update {0}'.format(
os.path.join(site.paths['static'], 'css'))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment