Skip to content


Subversion checkout URL

You can clone with
Download ZIP


JST debug behavior is broken #102

sean-lynch opened this Issue · 1 comment

2 participants


Debug = True or Debug = 'merge' breaks the applications that depend on JST to compile their templates. The JST filter should be run regardless of the value of the debug flag as simply merging the unprocessed HTML files into a single file doesn't make those templates retrievable by Javascript.

For an trivial example, see: - If you uncomment either of the debug flags, the resulting file is simply merged HTML, and not a JST object.

The work around is set the debug flag on any bundle that uses JST to false, but as far as I can tell, that needs to be done in code as a hack when setting up the environment. See:


This is a problem also with css and js compiler filters. The original design intention was to use the debug flag with nested bundles:

This does't work when defining bundles in templates, and it does't work when using things like the YAMLLoader, since nesting bundles isn't supported there.

I do intend to find a better solution. You may want to look at (and subscribe to) #12 and #60, which both touch on this.

#12 would introduce JSBundle/CSSBundle classes, which would solve the problem by constructing the correct nested Bundle structure internally.

#60 would approach this more directly by allowing filters to specify when they run.

@miracle2k miracle2k closed this
@miracle2k miracle2k referenced this issue from a commit
@miracle2k Limited ability for filters to run in debug mode.
Filters can now declare that they need to run in 'merge' mode (cssrewrite),
or that they need to run always (compiler-type filters).

In the latter case, if such a filter is used, the bundle will automatically be
merged. This is a more limited change than it sounds - still, see the section
on backwards-incompatibilities in the docs for more info.

Closes #60, and solves the requests in #73, #102 and possibly others.
Some relation to #120.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.