def __init__(self,<EOL>template_root,<EOL>template_name,<EOL>js_module_format=None,<EOL>runtime_path='<STR_LIT>',<EOL>include_prefix='<STR_LIT>',<EOL>include_ext='<STR_LIT>',<EOL>child_blocks=None,<EOL>dependencies=None,<EOL>custom_filters=None):
self.environment = Environment(loader=FileSystemLoader(template_root),<EOL>autoescape=True,<EOL>extensions=['<STR_LIT>', '<STR_LIT>'])<EOL>self.output = six.StringIO()<EOL>self.stored_names = set()<EOL>self.temp_var_names = temp_var_names_generator()<EOL>self.state = STATE_DEFAULT<EOL>self.child_blocks = child_blocks or {}<EOL>self.dependencies = dependencies or []<EOL>self._runtime_function_cache = []<EOL>self.js_module_format = js_module_format<EOL>self.runtime_path = runtime_path<EOL>self.include_prefix = include_prefix<EOL>self.include_ext = include_ext<EOL>self.template_root = template_root<EOL>self.template_name = template_name<EOL>self.custom_filters = custom_filters or []<EOL>self.js_function_name = '<STR_LIT>' + '<STR_LIT>'.join(<EOL>x.title() for x in re.split(r'<STR_LIT>', path.splitext(self.template_name)[<NUM_LIT:0>])<EOL>)<EOL>self.context_name = '<STR_LIT>'<EOL>self._add_dependency(self.runtime_path, '<STR_LIT>')<EOL>template_string, template_path, _ = self.environment.loader.get_source(<EOL>self.environment, self.template_name<EOL>)<EOL>self.template_path = template_path<EOL>if self.js_module_format not in JS_MODULE_FORMATS.keys():<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>' % JS_MODULE_FORMATS.keys()<EOL>)<EOL><DEDENT>self.ast = self.environment.parse(template_string)<EOL>try:<EOL><INDENT>for node in self.ast.body:<EOL><INDENT>self._process_node(node)<EOL><DEDENT><DEDENT>except ExtendsException:<EOL><INDENT>pass<EOL><DEDENT>
Args:
    template_root (str): The path to where templates should be loaded from.
    template_name (str): The name of the template to compile (relative to `template_root`).
    js_module_format (str, optional): The JavaScript module format to use.
                                      One of ('amd', 'commonjs', 'es6')
    runtime_path (str, optional): If `js_module_format` is specified then the JavaScript
                                  runtime will be imported using the appropriate method.
                                  It defaults to assuming it will be imported from
                                  `node_modules` but you can change it using this option.
    include_prefix (str, optional): If using the `amd` module format you can use this option
                                    to add a prefix to every include path as AMD imports are
                                    generally relative to the main file, not the module
                                    importing.
    include_ext (str, optional): By default any includes will be references without an
                                 extension, as neither AMD, commonJS or ES6 require the
                                 '.js' extension. If you want to use an extension, say
                                 '.template' then set this option to a string including
                                 the leading '.'
    child_blocks (dict, optional): Used internally when handling templates that extend
                                   other templates.
    dependencies (list of tuple, optional): Used internally when handling templates that
                                            extend other templates.
    custom_filters (list of str, optional): List of custom filters which should be allowed.
                                            These may be filters supported by Jinja but not
                                            supported by jinja-to-js. These filters MUST be
                                            registered with the jinja-to-js JS runtime.