sassutils.builder — Build the whole directory¶
- class sassutils.builder.Manifest(sass_path, css_path=None, wsgi_path=None, strip_extension=None)¶
Building manifest of Sass/SCSS.
- Parameters:
- build(package_dir, output_style='nested')¶
Builds the Sass/SCSS files in the specified
sass_path. It findssass_pathand locatescss_pathas relative to the givenpackage_dir.- Parameters:
- Returns:
the set of compiled CSS filenames
- Return type:
New in version 0.6.0: The
output_styleparameter.
- build_one(package_dir, filename, source_map=False)¶
Builds one Sass/SCSS file.
- Parameters:
- Returns:
the filename of compiled CSS
- Return type:
str,basestring
New in version 0.4.0: Added optional
source_mapparameter.
- resolve_filename(package_dir, filename)¶
Gets a proper full relative path of Sass source and CSS source that will be generated, according to
package_dirandfilename.
- sassutils.builder.SUFFIXES = frozenset({'sass', 'scss'})¶
(
frozenset) The set of supported filename suffixes.
- sassutils.builder.SUFFIX_PATTERN = re.compile('[.](sass|scss)$')¶
(
re.RegexObject) The regular expression pattern which matches to filenames of supportedSUFFIXES.
- sassutils.builder.build_directory(sass_path, css_path, output_style='nested', _root_sass=None, _root_css=None, strip_extension=False)¶
Compiles all Sass/SCSS files in
pathto CSS.- Parameters:
sass_path (
str,basestring) – the path of the directory which contains source files to compilecss_path (
str,basestring) – the path of the directory compiled CSS files will gooutput_style (
str) – an optional coding style of the compiled result. choose one of:'nested'(default),'expanded','compact','compressed'
- Returns:
a dictionary of source filenames to compiled CSS filenames
- Return type:
New in version 0.6.0: The
output_styleparameter.