grunt.js
‘use strict’;
module.exports = function(grunt) {
// project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
// create customized bower bundle
bower: {
files: {
'dist/bpmn-viewer-custom.js': [ 'index.js' ]
},
options: {
browserifyOptions: {
standalone: 'BpmnJS',
insertGlobalVars: {
process: function () {
return 'undefined';
},
Buffer: function () {
return 'undefined';
}
}
}
}
}
}
});
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('default', [ 'browserify:bower' ]);
};
app.js
// get bpmn-js
var BpmnViewer = require(‘bpmn-js/lib/Modeler’);
// load additional modules
var additionalModules = [
require(‘bpmn-js-properties-panel’),
require(‘bpmn-js-properties-panel/lib/provider/bpmn’),
require(‘bpmn-js-properties-panel/lib/provider/camunda’)
];
// add additional (default!) modules to bpmn-js
BpmnViewer.prototype._modules = BpmnViewer.prototype._modules.concat(additionalModules);
// export
module.exports = BpmnViewer;
html
<!doctype html>
The properties panel does not display