Skip to content

Instantly share code, notes, and snippets.

@miracle2k
Created May 30, 2012 11:23
Show Gist options
  • Save miracle2k/2835601 to your computer and use it in GitHub Desktop.
Save miracle2k/2835601 to your computer and use it in GitHub Desktop.
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