Created
May 30, 2012 11:23
-
-
Save miracle2k/2835601 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from webassets.test import TempEnvironmentHelper | |
from webassets import * | |
with TempEnvironmentHelper() as h: | |
h.create_files({ | |
'empty': '', | |
'scss/styles1.scss': 'h1 { color: red }', | |
'scss/styles2.scss': 'h2 { color: green }', | |
}) | |
h.env.debug = True | |
scss_bundle = Bundle('scss/styles1.scss', | |
'scss/styles2.scss', | |
filters='pyscss', debug=False, | |
output='gen/scss/styles.css') | |
css_compressed_bundle = Bundle(scss_bundle, | |
filters='yui_css,datauri', | |
output='gen/css/compressed_bundle.css') | |
css_compressed_bundle.urls(env=h.env) | |
assert not h.exists('gen/css/compressed_bundle.css') | |
h.p('gen/scss/styles.css') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment