1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 16:36:47 +02:00
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
This commit is contained in:
Toby Zerner
2018-06-20 13:35:48 +09:30
committed by GitHub
parent 96c96193e4
commit 6eae43688e
16 changed files with 4756 additions and 332 deletions

View File

@@ -0,0 +1,10 @@
/*
* 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.
*/
export * from './src/admin';

View File

@@ -1,10 +0,0 @@
var gulp = require('flarum-gulp');
gulp({
modules: {
'flarum/statistics': 'src/**/*.js'
},
files: [
'node_modules/frappe-charts/dist/frappe-charts.min.iife.js'
]
});

File diff suppressed because one or more lines are too long

View File

@@ -1,10 +0,0 @@
{
"private": true,
"devDependencies": {
"gulp": "^3.9.1",
"flarum-gulp": "^0.2.0"
},
"dependencies": {
"frappe-charts": "0.0.8"
}
}

4700
extensions/statistics/js/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
{
"name": "@flarum/flarum-ext-statistics",
"version": "0.0.0",
"dependencies": {
"flarum-webpack-config": "^0.1.0-beta.8",
"frappe-charts": "0.0.8",
"webpack": "^4.0.0",
"webpack-cli": "^3.0.7"
},
"scripts": {
"build": "webpack --mode production --progress",
"watch": "webpack --mode development --watch"
}
}

View File

@@ -3,7 +3,7 @@ import { extend } from 'flarum/extend';
import DashboardPage from 'flarum/components/DashboardPage';
import StatisticsWidget from 'flarum/statistics/components/StatisticsWidget';
import StatisticsWidget from './components/StatisticsWidget';
app.initializers.add('flarum-statistics', () => {
extend(DashboardPage.prototype, 'availableWidgets', widgets => {

View File

@@ -0,0 +1,3 @@
const config = require('flarum-webpack-config');
module.exports = config();