FEATURE: Multi-file javascript support for themes (#7526)

You can now add javascript files under `/javascripts/*` in a theme, and they will be loaded as if they were included in core, or a plugin. If you give something the same name as a core/plugin file, it will be overridden. Support file extensions are `.js.es6`, `.hbs` and `.raw.hbs`.
This commit is contained in:
David Taylor
2019-06-03 10:41:00 +01:00
committed by GitHub
parent ba3bc6b2fe
commit 7500eed4c0
10 changed files with 156 additions and 14 deletions

View File

@@ -367,6 +367,7 @@ HTML
var themePrefix = function themePrefix(key) {
return 'theme_translations.#{theme.id}.' + key;
};
Discourse._registerPluginCode('1.0', function (api) {
try {
alert(settings.name);var a = function a() {};
@@ -402,6 +403,7 @@ HTML
var themePrefix = function themePrefix(key) {
return 'theme_translations.#{theme.id}.' + key;
};
Discourse._registerPluginCode('1.0', function (api) {
try {
alert(settings.name);var a = function a() {};