wisemapping-frontend/packages/mindplot/lib/mindplot.js

58 lines
1.3 KiB
JavaScript
Raw Normal View History

2021-07-16 16:41:58 +02:00
'use strict';
module.exports = mindplot; //eslint-disable-line
function mindplot() {
// Jquery for mindplot and bootstrap
global.$ = require('jquery');
global.jQuery = require('jquery');
// Mootools for the classes of Mindplot
require('mootools');
// Underscore handling common tasks
global._ = require('underscore');
// Core-js packages of Wisemapping
global.core = require('@wismapping/core-js');
define(['raphael'], (Raphael) => {
global.Raphael = Raphael;
});
require('../test/javascript/static/test/raphael-plugins');
// Bootsrap for styles
require('./components/libraries/bootstrap/js/bootstrap.min');
/* * * * * * * *
* MINDPLOT *
* * * * * * * */
2021-07-16 16:41:58 +02:00
// Commands
2021-09-07 22:31:46 +02:00
const { Commands } = require('./components/commands');
2021-07-16 16:41:58 +02:00
// Layout
2021-09-07 22:31:46 +02:00
const { Layout } = require('./components/layout');
// Model
2021-09-02 18:32:23 +02:00
const { Model } = require('./components/model');
2021-09-07 22:31:46 +02:00
// Persistence
const { Persistence } = require('./components/persistence');
// Widgets
const { Widgets } = require('./components/widget');
2021-09-02 18:32:23 +02:00
// Components
2021-09-07 22:31:46 +02:00
const { Components } = require('./components');
2021-07-16 16:41:58 +02:00
return {
2021-09-08 22:45:26 +02:00
commands: Commands,
layout: Layout,
2021-09-02 18:32:23 +02:00
models: Model,
2021-09-08 22:45:26 +02:00
persistence: Persistence,
widget: Widgets,
component: Components,
2021-07-16 16:41:58 +02:00
};
}