ES6: Enable compatibility layer for routes

This commit is contained in:
Robin Ward
2014-07-22 12:09:11 -04:00
parent 75c477a9aa
commit fd3ceae1d6
2 changed files with 2 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ module Tilt
# For backwards compatibility with plugins, for now export the Global format too.
# We should eventually have an upgrade system for plugins to use ES6 or some other
# resolve based API.
if ENV['DISCOURSE_NO_CONSTANTS'].nil? && scope.logical_path =~ /discourse\/(controllers|components|views)\/(.*)/
if ENV['DISCOURSE_NO_CONSTANTS'].nil? && scope.logical_path =~ /discourse\/(controllers|components|views|routes)\/(.*)/
type = Regexp.last_match[1]
file_name = Regexp.last_match[2].gsub(/[\-\/]/, '_')
class_name = file_name.classify