chore(project): build using ES6 ready deps

* diagram-js@1
* updated utils
This commit is contained in:
Nico Rehwaldt 2018-04-02 11:09:24 +02:00
parent b5ccd81731
commit 56a644177d
4 changed files with 49 additions and 7 deletions

3
.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": [ "env" ]
}

View File

@ -36,6 +36,10 @@
],
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-env": "^1.6.1",
"babelify": "^8.0.0",
"browser-pack-flat": "^3.0.8",
"browserify": "^14.5.0",
"browserify-derequire": "^0.9.1",
@ -76,14 +80,14 @@
},
"dependencies": {
"bpmn-font": "^0.8.0",
"bpmn-moddle": "^4.0.0",
"diagram-js": "^0.31.1",
"diagram-js-direct-editing": "^0.23.0",
"bpmn-moddle": "^5.1.0",
"diagram-js": "^1.1.0",
"diagram-js-direct-editing": "^1.2.0",
"ids": "^0.2.0",
"inherits": "^2.0.1",
"min-dash": "^2.4.0",
"min-dom": "^2.2.0",
"min-dash": "^3.0.0",
"min-dom": "^3.0.0",
"object-refs": "^0.1.1",
"tiny-svg": "^1.1.0"
"tiny-svg": "^2.0.0"
}
}

View File

@ -1,5 +1,7 @@
'use strict';
var bbl = require('babel-plugin-add-module-exports');
var browserify = require('browserify'),
derequire = require('browserify-derequire'),
collapse = require('bundle-collapser/plugin'),
@ -128,6 +130,14 @@ function bundle(dest, variant, entry, done) {
timer.start('build prod');
browserify(browserifyOptions)
.transform('babelify', {
global: true,
babelrc: false,
presets: [ 'env' ],
plugins: [
bbl
]
})
.transform(envify, {
NODE_ENV: 'production'
})
@ -170,6 +180,14 @@ function bundle(dest, variant, entry, done) {
timer.start('build dev');
browserify(browserifyOptions)
.transform('babelify', {
global: true,
babelrc: false,
presets: [ 'env' ],
plugins: [
bbl
]
})
.transform(envify, {
NODE_ENV: 'development'
})

View File

@ -1,5 +1,7 @@
'use strict';
var bbl = require('babel-plugin-add-module-exports');
var path = require('path');
var basePath = '../../';
@ -72,7 +74,22 @@ module.exports = function(karma) {
debug: true,
paths: [ absoluteBasePath ],
transform: [
[ 'stringify', { global: true, extensions: [ '.bpmn', '.xml', '.css' ] } ]
[ 'babelify', {
global: true,
babelrc: false,
presets: [ 'env' ],
plugins: [
bbl
]
} ],
[ 'stringify', {
global: true,
extensions: [
'.bpmn',
'.xml',
'.css'
]
} ]
]
}
});