chore(build): speedup by using only one browserify target
This commit is contained in:
parent
bd70eced41
commit
832cd864e0
35
Gruntfile.js
35
Gruntfile.js
|
@ -87,10 +87,7 @@ module.exports = function(grunt) {
|
|||
detectGlobals: false,
|
||||
insertGlobalVars: [],
|
||||
debug: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
alias: [
|
||||
'node_modules/jquery:jquery',
|
||||
'node_modules/lodash:lodash',
|
||||
|
@ -98,41 +95,21 @@ module.exports = function(grunt) {
|
|||
'<%= config.sources %>/main.js:bpmn-js',
|
||||
'<%= config.sources %>/Viewer.js:bpmn-js/Viewer',
|
||||
'<%= config.sources %>/Modeler.js:bpmn-js/Modeler'
|
||||
],
|
||||
watch: true
|
||||
]
|
||||
},
|
||||
watch: {
|
||||
files: {
|
||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ],
|
||||
'<%= config.dist %>/bpmn-viewer.js': [ '<%= config.sources %>/lib/Viewer.js' ]
|
||||
}
|
||||
},
|
||||
modeler: {
|
||||
files: {
|
||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ]
|
||||
},
|
||||
options: {
|
||||
alias: [
|
||||
'node_modules/jquery:jquery',
|
||||
'node_modules/lodash:lodash',
|
||||
'node_modules/bpmn-moddle:bpmn-moddle',
|
||||
'<%= config.sources %>/main.js:bpmn-js',
|
||||
'<%= config.sources %>/Viewer.js:bpmn-js/Viewer',
|
||||
'<%= config.sources %>/Modeler.js:bpmn-js/Modeler'
|
||||
]
|
||||
watch: true
|
||||
}
|
||||
},
|
||||
viewer: {
|
||||
lib: {
|
||||
files: {
|
||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ],
|
||||
'<%= config.dist %>/bpmn-viewer.js': [ '<%= config.sources %>/lib/Viewer.js' ]
|
||||
},
|
||||
options: {
|
||||
alias: [
|
||||
'node_modules/jquery:jquery',
|
||||
'node_modules/lodash:lodash',
|
||||
'node_modules/bpmn-moddle:bpmn-moddle',
|
||||
'<%= config.sources %>/main.js:bpmn-js',
|
||||
'<%= config.sources %>/Viewer.js:bpmn-js/Viewer'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -248,7 +225,7 @@ module.exports = function(grunt) {
|
|||
tasks.push('uglify:modeler', 'uglify:viewer');
|
||||
}
|
||||
|
||||
return grunt.task.run([ 'browserify:modeler', 'browserify:viewer' ].concat(tasks));
|
||||
return grunt.task.run(['browserify:lib'].concat(tasks));
|
||||
}
|
||||
|
||||
if (target === 'samples') {
|
||||
|
|
Loading…
Reference in New Issue