framework/extensions/subscriptions/bootstrap.php
Toby Zerner 078eec06d2 Webpack (#17)
See https://github.com/flarum/core/pull/1367

* Replace gulp with webpack and npm scripts for JS compilation
* Set up Travis CI to commit compiled JS
* Restructure `js` directory; only one instance of npm, forum/admin are "submodules"
* Restructure `less` directory
2018-06-20 13:36:12 +09:30

36 lines
1.1 KiB
PHP

<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Extend;
use Flarum\Forum\Controller\FrontendController;
use Flarum\Subscriptions\Listener;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\View\Factory;
return [
(new Extend\Assets('forum'))
->js(__DIR__.'/js/dist/forum.js')
->asset(__DIR__.'/less/forum.less'),
(new Extend\Routes('forum'))
->get('/following', 'following', FrontendController::class),
function (Dispatcher $events, Factory $views) {
$events->subscribe(Listener\AddDiscussionSubscriptionAttribute::class);
$events->subscribe(Listener\FilterDiscussionListBySubscription::class);
$events->subscribe(Listener\SaveSubscriptionToDatabase::class);
$events->subscribe(Listener\SendNotificationWhenReplyIsPosted::class);
$events->subscribe(Listener\FollowAfterReply::class);
$views->addNamespace('flarum-subscriptions', __DIR__.'/views');
}
];