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,
|
detectGlobals: false,
|
||||||
insertGlobalVars: [],
|
insertGlobalVars: [],
|
||||||
debug: true
|
debug: true
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
options: {
|
|
||||||
alias: [
|
alias: [
|
||||||
'node_modules/jquery:jquery',
|
'node_modules/jquery:jquery',
|
||||||
'node_modules/lodash:lodash',
|
'node_modules/lodash:lodash',
|
||||||
|
@ -98,41 +95,21 @@ module.exports = function(grunt) {
|
||||||
'<%= config.sources %>/main.js:bpmn-js',
|
'<%= config.sources %>/main.js:bpmn-js',
|
||||||
'<%= config.sources %>/Viewer.js:bpmn-js/Viewer',
|
'<%= config.sources %>/Viewer.js:bpmn-js/Viewer',
|
||||||
'<%= config.sources %>/Modeler.js:bpmn-js/Modeler'
|
'<%= config.sources %>/Modeler.js:bpmn-js/Modeler'
|
||||||
],
|
]
|
||||||
watch: true
|
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
files: {
|
files: {
|
||||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ],
|
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ],
|
||||||
'<%= config.dist %>/bpmn-viewer.js': [ '<%= config.sources %>/lib/Viewer.js' ]
|
'<%= config.dist %>/bpmn-viewer.js': [ '<%= config.sources %>/lib/Viewer.js' ]
|
||||||
}
|
|
||||||
},
|
|
||||||
modeler: {
|
|
||||||
files: {
|
|
||||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ]
|
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
alias: [
|
watch: true
|
||||||
'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'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
viewer: {
|
lib: {
|
||||||
files: {
|
files: {
|
||||||
|
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ],
|
||||||
'<%= config.dist %>/bpmn-viewer.js': [ '<%= config.sources %>/lib/Viewer.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');
|
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') {
|
if (target === 'samples') {
|
||||||
|
|
Loading…
Reference in New Issue