Add admin client JS/LESS to extension stub

This commit is contained in:
Toby Zerner
2015-08-04 17:18:45 +09:30
parent 9700fbbb0b
commit 556b93e367
8 changed files with 36 additions and 3 deletions

View File

@ -0,0 +1,7 @@
var gulp = require('flarum-gulp');
gulp({
modules: {
'{{name}}': 'src/**/*.js'
}
});

View File

@ -0,0 +1,7 @@
{
"private": true,
"devDependencies": {
"gulp": "^3.8.11",
"flarum-gulp": "git+https://github.com/flarum/gulp.git"
}
}

View File

@ -0,0 +1,6 @@
import { extend } from 'flarum/extend';
import app from 'flarum/app';
app.initializers.add('{{name}}', () => {
// TODO
});

View File

@ -1,5 +1,7 @@
var gulp = require('flarum-gulp');
gulp({
modulePrefix: '{{name}}'
modules: {
'{{name}}': 'src/**/*.js'
}
});

View File

@ -1,6 +1,6 @@
import { extend } from 'flarum/extend';
import app from 'flarum/app';
app.initializers.add('{{name}}', app => {
app.initializers.add('{{name}}', () => {
// TODO
});

View File

@ -29,5 +29,16 @@ class AddClientAssets
$event->forumTranslations([
// '{{name}}.hello_world'
]);
$event->adminAssets([
__DIR__.'/../../js/admin/dist/extension.js',
__DIR__.'/../../less/admin/extension.less'
]);
$event->adminBootstrapper('{{name}}/main');
$event->adminTranslations([
// '{{name}}.hello_world'
]);
}
}