mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:11:20 +08:00
DEV: Remove ember-cli flags from the backend (#17147)
…and other auxiliary code * Restore `QUNIT_EMBER_CLI` flag warning * Add `ALLOW_EMBER_CLI_PROXY_BYPASS`
This commit is contained in:
@ -10,19 +10,6 @@ module EmberCli
|
||||
vendor.js
|
||||
)
|
||||
|
||||
ALIASES ||= {
|
||||
"application" => "discourse",
|
||||
"discourse/tests/test-support-rails" => "test-support",
|
||||
"discourse/tests/test-helpers-rails" => "test-helpers"
|
||||
}
|
||||
|
||||
def self.enabled?
|
||||
if !Rails.env.production? && ENV["EMBER_CLI_PROD_ASSETS"] == "0"
|
||||
STDERR.puts "The 'legacy' ember environment is discontinued. Running with ember-cli assets. Remove the EMBER_CLI_PROD_ASSETS=0 flag."
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
def self.script_chunks
|
||||
return @@chunk_infos if defined? @@chunk_infos
|
||||
|
||||
@ -40,17 +27,7 @@ module EmberCli
|
||||
{}
|
||||
end
|
||||
|
||||
# Some assets have changed name following the switch
|
||||
# to ember-cli. When the switch is complete, we can
|
||||
# drop this method and update all the references
|
||||
# to use the new names
|
||||
def self.transform_name(name)
|
||||
return name if !enabled?
|
||||
ALIASES[name] || name
|
||||
end
|
||||
|
||||
def self.is_ember_cli_asset?(name)
|
||||
return false if !enabled?
|
||||
ASSETS.include?(name) || name.start_with?("chunk.")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user