PERF: DISCOURSE_NO_CONSTANTS removed

we minimize the amount of constants we decalre see: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821
This commit is contained in:
Sam 2015-12-01 10:58:01 +11:00
parent b0b85725ad
commit aa2f802247

View File

@ -106,7 +106,7 @@ module Tilt
# For backwards compatibility with plugins, for now export the Global format too. # 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 # We should eventually have an upgrade system for plugins to use ES6 or some other
# resolve based API. # resolve based API.
if (ENV['DISCOURSE_NO_CONSTANTS'].nil? || whitelisted?(scope.logical_path)) && if whitelisted?(scope.logical_path) &&
scope.logical_path =~ /(discourse|admin)\/(controllers|components|views|routes|mixins|models)\/(.*)/ scope.logical_path =~ /(discourse|admin)\/(controllers|components|views|routes|mixins|models)\/(.*)/
type = Regexp.last_match[2] type = Regexp.last_match[2]