chore(project): es6ify source code

* use ES6 import / export
* UTILS: export individual utilities
* TESTS: localize TestHelper includes

BREAKING CHANGE:

* all utilities export independent functions
* library sources got ported to ES6. You must now use
  a ES module bundler such as Browserify + babelify or
  Webpack to consume this library (or parts of it).
This commit is contained in:
Nico Rehwaldt
2018-04-02 21:01:53 +02:00
parent 56a644177d
commit d3449ca87c
224 changed files with 2635 additions and 1932 deletions

View File

@ -1,15 +1,16 @@
'use strict';
var inherits = require('inherits');
import inherits from 'inherits';
var CommandInterceptor = require('diagram-js/lib/command/CommandInterceptor');
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
import { is } from '../../../util/ModelUtil';
var is = require('../../../util/ModelUtil').is;
/**
* BPMN specific create data object behavior
*/
function CreateDataObjectBehavior(eventBus, bpmnFactory, moddle) {
export default function CreateDataObjectBehavior(eventBus, bpmnFactory, moddle) {
CommandInterceptor.call(this, eventBus);
@ -30,8 +31,10 @@ function CreateDataObjectBehavior(eventBus, bpmnFactory, moddle) {
}
CreateDataObjectBehavior.$inject = [ 'eventBus', 'bpmnFactory', 'moddle' ];
CreateDataObjectBehavior.$inject = [
'eventBus',
'bpmnFactory',
'moddle'
];
inherits(CreateDataObjectBehavior, CommandInterceptor);
module.exports = CreateDataObjectBehavior;
inherits(CreateDataObjectBehavior, CommandInterceptor);