chore(build): use watchify for auto-building
(significant build speedup ahead)
This commit is contained in:
parent
a57cb76943
commit
01ba328eb7
27
Gruntfile.js
27
Gruntfile.js
|
@ -1,6 +1,7 @@
|
|||
module.exports = function(grunt) {
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
require('time-grunt')(grunt);
|
||||
|
||||
/* global Buffer,process*/
|
||||
|
||||
|
@ -77,9 +78,27 @@ module.exports = function(grunt) {
|
|||
debug: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
alias: [
|
||||
'node_modules/jquery:jquery',
|
||||
'node_modules/lodash:lodash',
|
||||
'node_modules/bpmn-moddle:bpmn/Model',
|
||||
'<%= config.sources %>/main.js:bpmn',
|
||||
'<%= config.sources %>/Viewer.js:bpmn/Viewer',
|
||||
'<%= config.sources %>/Modeler.js:bpmn/Modeler'
|
||||
],
|
||||
watch: true,
|
||||
keepalive: true
|
||||
},
|
||||
files: {
|
||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ],
|
||||
'<%= config.dist %>/bpmn-viewer.js': [ '<%= config.sources %>/lib/Viewer.js' ]
|
||||
}
|
||||
},
|
||||
modeler: {
|
||||
files: {
|
||||
'<%= config.dist %>/bpmn.js': [ 'shim/*.js', '<%= config.sources %>/**/*.js' ]
|
||||
'<%= config.dist %>/bpmn.js': [ '<%= config.sources %>/**/*.js' ]
|
||||
},
|
||||
options: {
|
||||
alias: [
|
||||
|
@ -121,10 +140,6 @@ module.exports = function(grunt) {
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
sources: {
|
||||
files: [ '<%= config.sources %>/**/*.js' ],
|
||||
tasks: [ 'build:lib' ]
|
||||
},
|
||||
samples: {
|
||||
files: [ '<%= config.samples %>/**/*.*' ],
|
||||
tasks: [ 'build:samples' ]
|
||||
|
@ -227,7 +242,7 @@ module.exports = function(grunt) {
|
|||
});
|
||||
|
||||
grunt.registerTask('auto-build', [
|
||||
'build:all',
|
||||
'browserify:watch',
|
||||
'connect:livereload',
|
||||
'watch'
|
||||
]);
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"grunt-jasmine-node": "~0.2.1",
|
||||
"grunt-release": "~0.7.0",
|
||||
"load-grunt-tasks": "~0.3.0",
|
||||
"time-grunt": "~0.3.0",
|
||||
"karma": "~0.12.8",
|
||||
"karma-jasmine": "https://github.com/Nikku/karma-jasmine/archive/jasmine-v2.0.0-latest-1.tar.gz",
|
||||
"karma-chrome-launcher": "~0.1.2",
|
||||
|
@ -59,8 +60,8 @@
|
|||
"lodash": "~2.4.0",
|
||||
"didi": "~0.0.4",
|
||||
"jquery": "~2.1.0",
|
||||
"through": "^2.3.4",
|
||||
"jquery-mousewheel": "^3.1.11"
|
||||
"jquery-mousewheel": "~3.1.11",
|
||||
"through": "~2.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"bpmn-moddle": "~0.0.1",
|
||||
|
|
Loading…
Reference in New Issue