From b175513765a216e4ec07635e3ecbfc7def7c0560 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 24 Aug 2022 10:20:38 +0100 Subject: [PATCH] DEV: Enable ember-cli plugin assets by default (#18058) For now, `EMBER_CLI_PLUGIN_ASSETS` can be set to 0 to restore the old behavior. This option will be removed very soon. --- app/assets/javascripts/discourse/ember-cli-build.js | 2 +- app/assets/javascripts/discourse/lib/bootstrap-json/index.js | 2 +- lib/ember_cli.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/ember-cli-build.js b/app/assets/javascripts/discourse/ember-cli-build.js index f6a59caac3c..f83426da6e5 100644 --- a/app/assets/javascripts/discourse/ember-cli-build.js +++ b/app/assets/javascripts/discourse/ember-cli-build.js @@ -146,7 +146,7 @@ module.exports = function (defaults) { ); let discoursePluginsTree; - if (process.env.EMBER_CLI_PLUGIN_ASSETS === "1") { + if (process.env.EMBER_CLI_PLUGIN_ASSETS !== "0") { discoursePluginsTree = app.project .findAddonByName("discourse-plugins") .generatePluginsTree(); diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js index 3249cbbc6eb..238cf1e734b 100644 --- a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js +++ b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js @@ -381,7 +381,7 @@ module.exports = { if (shouldLoadPluginTestJs() && type === "test-plugin-js") { const scripts = []; - if (process.env.EMBER_CLI_PLUGIN_ASSETS === "1") { + if (process.env.EMBER_CLI_PLUGIN_ASSETS !== "0") { const pluginInfos = this.app.project .findAddonByName("discourse-plugins") .pluginInfos(); diff --git a/lib/ember_cli.rb b/lib/ember_cli.rb index 7135e96a46a..6fd2bde7ba2 100644 --- a/lib/ember_cli.rb +++ b/lib/ember_cli.rb @@ -2,7 +2,7 @@ module EmberCli def self.plugin_assets? - ENV["EMBER_CLI_PLUGIN_ASSETS"] == "1" + ENV["EMBER_CLI_PLUGIN_ASSETS"] != "0" end def self.assets