Skip to content

Instantly share code, notes, and snippets.

@pivotal-blueprint
Created November 1, 2012 18:34
Show Gist options
  • Save pivotal-blueprint/3995613 to your computer and use it in GitHub Desktop.
Save pivotal-blueprint/3995613 to your computer and use it in GitHub Desktop.
Minimal test case
#!/usr/bin/env python
import sass
import sys
infile, outfile = sys.argv[1:]
with open(infile) as f:
# Defaults to output_style=nested -- leaving an explicit argument
# as a reminder. Should be "compressed" in production -- may require
# library to uglify output.
compiled = sass.compile(string=f.read(),
output_style="nested",
include_paths=[])
with open(outfile, "w") as f:
f.write(compiled)
#!/bin/bash -x
python compile_with_libsass.py test.scss output.css
@media (min-width: 980px) {
a {
color: red;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment