def compile(): compiler = Stylus() for fname in glob(fl + '/static/css/*.styl'): print('compiling ' + fname) styl = open(fname, 'r') css = open(fname.replace('.styl', '.css'), 'w') css.write(compiler.compile(styl.read())) styl.close() css.close()
def stylus_to_css(source): compiler = Stylus(plugins={'nib':{}}) return as_unicode('<style>{css}</style>').format(css=compiler.compile(source).strip())
def stylus_to_css(source): compiler = Stylus() return u('<style>{css}</style>').format( css=compiler.compile(source).strip())
def stylus_to_css(source): compiler = Stylus() return u('<style>{css}</style>').format(css=compiler.compile(source).strip())
def stylus_to_css(source): compiler = Stylus(plugins={'nib': {}}) return as_unicode('<style>{css}</style>').format( css=compiler.compile(source).strip())