djblets.pipeline.compilers.less.LessCompiler¶
- class LessCompiler(verbose, storage)¶
- Bases: - LessCompiler- A LESS compiler which doesn’t redirect the output. - Pipeline’s LESS compiler outputs to stdout and redirects that output to the target file, because of some bug in old versions of lessc. We don’t want to do that, because it interferes with the generation of sourcemaps. - To use this, add the path to this class to - settings.PIPELINE['COMPILERS'].- Changed in version 2.2: Added in-memory caching of import lists and file information to speed up performance of compilations. - __init__(verbose, storage)¶
 - Methods - __init__(verbose, storage)- Clear the caches used for faster compilation. - compile_file(infile, outfile[, outdated, force])- Compile a given file. - execute_command(command[, cwd, stdout_captured])- Execute a command at cwd, saving its normal output at stdout_captured. - is_outdated(infile, outfile)- Return whether a given file is outdated. - match_file(filename)- output_path(path, extension)- read_file(path)- save_file(path, content)- Attributes - Command line and arguments for less-imports.js. - output_extension- classmethod clear_caches()¶
- Clear the caches used for faster compilation. 
 - compile_file(infile, outfile, outdated=False, force=False)¶
- Compile a given file. 
 - is_outdated(infile, outfile)¶
- Return whether a given file is outdated. - This will compare the timestamps of the - infileand- outfile, but also compare the timestamp of- outfileagainst any import depedencies that exist.
 
