mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:11:58 +08:00
DEV: Support colocation of component templates in plugins (#18598)
This allows plugins to colocate component JS and HBS under `/plugins/{name}/assets/javascripts/discourse/components`. `discourse-presence` is updated to use this new pattern, which also serves as an integration test for this part of the build pipeline.
This commit is contained in:
@ -7,6 +7,7 @@ const mergeTrees = require("broccoli-merge-trees");
|
||||
const fs = require("fs");
|
||||
const concat = require("broccoli-concat");
|
||||
const RawHandlebarsCompiler = require("discourse-hbr/raw-handlebars-compiler");
|
||||
const DiscoursePluginColocatedTemplateProcessor = require("./colocated-template-compiler");
|
||||
|
||||
function fixLegacyExtensions(tree) {
|
||||
return new Funnel(tree, {
|
||||
@ -169,6 +170,8 @@ module.exports = {
|
||||
tree = namespaceModules(tree, pluginName);
|
||||
|
||||
tree = RawHandlebarsCompiler(tree);
|
||||
|
||||
tree = new DiscoursePluginColocatedTemplateProcessor(tree);
|
||||
tree = this.compileTemplates(tree);
|
||||
|
||||
tree = this.processedAddonJsFiles(tree);
|
||||
|
Reference in New Issue
Block a user