mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Webpack (#4)
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:
10
extensions/statistics/js/admin.js
Normal file
10
extensions/statistics/js/admin.js
Normal 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';
|
@@ -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'
|
||||
]
|
||||
});
|
264
extensions/statistics/js/admin/dist/extension.js
vendored
264
extensions/statistics/js/admin/dist/extension.js
vendored
File diff suppressed because one or more lines are too long
@@ -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
4700
extensions/statistics/js/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
extensions/statistics/js/package.json
Normal file
14
extensions/statistics/js/package.json
Normal 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"
|
||||
}
|
||||
}
|
@@ -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 => {
|
3
extensions/statistics/js/webpack.config.js
Normal file
3
extensions/statistics/js/webpack.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const config = require('flarum-webpack-config');
|
||||
|
||||
module.exports = config();
|
Reference in New Issue
Block a user