mirror of
https://github.com/flarum/core.git
synced 2025-07-23 17:51:24 +02:00
[WIP] JS Extender API foundation (#1468)
* Run extenders exported by extensions * Add some basic extenders * Patch Mithril as the very first thing so extension code can run safely * Load the payload into the app before booting extensions * Setup default routes before booting extensions
This commit is contained in:
@@ -57,7 +57,7 @@ class Assets implements ExtenderInterface
|
||||
$event->view->getJs()->addString(function () use ($extension) {
|
||||
$name = $extension->getId();
|
||||
|
||||
return 'var module={};'.file_get_contents($this->js).";flarum.extensions['$name']=module.exports";
|
||||
return 'var module={};'.file_get_contents($this->js).";\nflarum.extensions['$name']=module.exports";
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user