DEV: Move `shouldLoadPluginTestJs()` (#19045)
A first step in the effort to depend only on explicitly declared dependencies in package.json.
This commit is contained in:
parent
b36c5e7565
commit
9bf95d472d
|
@ -8,6 +8,7 @@ const fs = require("fs");
|
|||
const concat = require("broccoli-concat");
|
||||
const RawHandlebarsCompiler = require("discourse-hbr/raw-handlebars-compiler");
|
||||
const DiscoursePluginColocatedTemplateProcessor = require("./colocated-template-compiler");
|
||||
const EmberApp = require("ember-cli/lib/broccoli/ember-app");
|
||||
|
||||
function fixLegacyExtensions(tree) {
|
||||
return new Funnel(tree, {
|
||||
|
@ -217,4 +218,8 @@ module.exports = {
|
|||
// This addon doesn't contribute any 'real' trees to the app
|
||||
return;
|
||||
},
|
||||
|
||||
shouldLoadPluginTestJs() {
|
||||
return EmberApp.env() === "development" || process.env.LOAD_PLUGINS === "1";
|
||||
},
|
||||
};
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"dependencies": {
|
||||
"discourse-widget-hbs": "1.0.0",
|
||||
"ember-auto-import": "^2.4.3",
|
||||
"ember-cli": "~3.28.5",
|
||||
"ember-cli-babel": "^7.26.10",
|
||||
"ember-cli-htmlbars": "^6.1.1"
|
||||
},
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
engine-strict = true
|
|
@ -8,7 +8,7 @@ const path = require("path");
|
|||
const fs = require("fs");
|
||||
const fsPromises = fs.promises;
|
||||
const { JSDOM } = require("jsdom");
|
||||
const { shouldLoadPluginTestJs } = require("discourse/lib/plugin-js");
|
||||
const { shouldLoadPluginTestJs } = require("discourse-plugins");
|
||||
const { Buffer } = require("node:buffer");
|
||||
const { cwd, env } = require("node:process");
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
const EmberApp = require("ember-cli/lib/broccoli/ember-app");
|
||||
|
||||
module.exports = {
|
||||
shouldLoadPluginTestJs() {
|
||||
return EmberApp.env() === "development" || process.env.LOAD_PLUGINS === "1";
|
||||
},
|
||||
};
|
|
@ -5,7 +5,7 @@ const concat = require("broccoli-concat");
|
|||
const mergeTrees = require("broccoli-merge-trees");
|
||||
const deepmerge = require("deepmerge");
|
||||
const glob = require("glob");
|
||||
const { shouldLoadPluginTestJs } = require("discourse/lib/plugin-js");
|
||||
const { shouldLoadPluginTestJs } = require("discourse-plugins");
|
||||
|
||||
let built = false;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const mergeTrees = require("broccoli-merge-trees");
|
|||
const MessageFormat = require("messageformat");
|
||||
const deepmerge = require("deepmerge");
|
||||
const glob = require("glob");
|
||||
const { shouldLoadPluginTestJs } = require("discourse/lib/plugin-js");
|
||||
const { shouldLoadPluginTestJs } = require("discourse-plugins");
|
||||
|
||||
let built = false;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const TapReporter = require("testem/lib/reporters/tap_reporter");
|
||||
const { shouldLoadPluginTestJs } = require("discourse/lib/plugin-js");
|
||||
const { shouldLoadPluginTestJs } = require("discourse-plugins");
|
||||
const fs = require("fs");
|
||||
|
||||
class Reporter {
|
||||
|
|
Loading…
Reference in New Issue