mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:52:19 +08:00
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:
parent
b0b85725ad
commit
aa2f802247
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user