2022-06-17 08:50:21 -04:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const calculateCacheKeyForTree = require("calculate-cache-key-for-tree");
|
2023-07-10 17:07:21 -04:00
|
|
|
const path = require("path");
|
2022-06-17 08:50:21 -04:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: require("./package").name,
|
2023-07-10 17:07:21 -04:00
|
|
|
|
|
|
|
// return an empty tree here as we do not want the addon modules to be
|
|
|
|
// included into vendor.js; instead, we will produce a separate bundle
|
|
|
|
// (wizard.js) to be included via a script tag as needed
|
|
|
|
treeForAddon() {
|
2022-06-17 08:50:21 -04:00
|
|
|
return;
|
|
|
|
},
|
|
|
|
|
2023-07-10 17:07:21 -04:00
|
|
|
// custom method to produce the tree for wizard.js
|
|
|
|
// called by ember-cli-build.js in discourse core
|
|
|
|
treeForAddonBundle() {
|
|
|
|
let addonTreePath = path.resolve(this.root, this.treePaths.addon);
|
|
|
|
let addonTree = this.treeGenerator(addonTreePath);
|
|
|
|
return this._super.treeForAddon.call(this, addonTree);
|
|
|
|
},
|
|
|
|
|
2022-06-17 08:50:21 -04:00
|
|
|
cacheKeyForTree(tree) {
|
|
|
|
return calculateCacheKeyForTree(tree, this);
|
|
|
|
},
|
|
|
|
|
|
|
|
isDevelopingAddon() {
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
};
|