1 module.exports = function(grunt) {
3 require('load-grunt-tasks')(grunt);
5 var path = require('path');
8 * Resolve external project resource as file path
10 function resolvePath(project, file) {
11 return path.join(path.dirname(require.resolve(project)), file);
14 // project configuration
16 pkg: grunt.file.readJSON('package.json'),
25 ['<%=config.sources %>']
35 // make sure we do not include browser shims unnecessarily
38 process: function () {
53 '<%= config.dist %>/index.js': [ '<%= config.sources %>/**/*.js' ]
58 '<%= config.dist %>/index.js': [ '<%= config.sources %>/**/*.js' ]
66 src: resolvePath('diagram-js', 'assets/diagram-js.css'),
67 dest: '<%= config.dist %>/css/diagram-js.css'
75 cwd: '<%= config.sources %>/',
76 src: ['**/*.*', '!**/*.js'],
77 dest: '<%= config.dist %>'
84 files: [ '<%= config.sources %>/**/*.*' ],
107 grunt.registerTask('build', [ 'copy', 'browserify:app' ]);
109 grunt.registerTask('auto-build', [
112 'connect:livereload',
116 grunt.registerTask('default', [ 'jshint', 'build' ]);