Jump to >

djblets.pipeline.compilers.es6.ES6Compiler

class ES6Compiler(verbose, storage)[source]

Bases: pipeline.compilers.es6.ES6Compiler

An ES6 Compiler which compiles .es6.js to .js.

To use this, add the path to this class to settings.PIPELINE['COMPILERS'].

__init__(verbose, storage)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

Methods

__init__(verbose, storage) x.__init__(.
compile_file(infile, outfile[, outdated, force])
execute_command(command[, cwd, stdout_captured]) Execute a command at cwd, saving its normal output at stdout_captured.
is_outdated(infile, outfile)
match_file(path) Return whether the given path should use this compiler.
output_path(path, extension) Return the path of the output file for this compiler.
read_file(path)
save_file(path, content)

Attributes

input_extension
output_extension
input_extension = u'es6.js'[source]
match_file(path)[source]

Return whether the given path should use this compiler.

Parameters:path (unicode) – The source path.
Returns:Whether this compiler should be used for the given path.
Return type:bool
output_path(path, extension)[source]

Return the path of the output file for this compiler.

Parameters:
  • path (unicode) – The input path.
  • extension (unicode) – The target file extension.
Returns:

The input path with .es6.js renamed to .js.

Return type:

unicode