1 Star 0 Fork 81

chensiqima/activiti-designer

forked from 1k树/activiti-designer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Gruntfile.js 2.48 KB
一键复制 编辑 原始数据 按行查看 历史
jingxu 提交于 2019-10-22 16:34 . 初始化项目
var path = require('path');
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
/**
* Resolve external project resource as file path
*/
function resolvePath(project, file) {
return path.join(path.dirname(require.resolve(project)), file);
}
grunt.initConfig({
browserify: {
options: {
browserifyOptions: {
debug: true
},
transform: [
[ 'stringify', {
extensions: [ '.bpmn' ]
} ]
],
plugin: [
'esmify'
]
},
watch: {
options: {
watch: true
},
files: {
'dist/app.js': [ 'app/**/*.js' ]
}
},
app: {
files: {
'dist/app.js': [ 'app/**/*.js' ]
}
}
},
copy: {
diagram_js: {
files: [
{
src: resolvePath('diagram-js', 'assets/diagram-js.css'),
dest: 'dist/css/diagram-js.css'
}
]
},
bpmn_js: {
files: [
{
expand: true,
cwd: resolvePath('bpmn-js', 'dist/assets'),
src: ['**/*.*', '!**/*.js'],
dest: 'dist/vendor'
}
]
},
app: {
files: [
{
expand: true,
cwd: 'app/',
src: ['**/*.*', '!**/*.js'],
dest: 'dist'
}
]
}
},
less: {
options: {
dumpLineNumbers: 'comments',
paths: [
'node_modules'
]
},
styles: {
files: {
'dist/css/app.css': 'styles/app.less'
}
}
},
watch: {
options: {
livereload: true
},
samples: {
files: [ 'app/**/*.*' ],
tasks: [ 'copy:app' ]
},
less: {
files: [
'styles/**/*.less',
'node_modules/bpmn-js-properties-panel/styles/**/*.less'
],
tasks: [
'less'
]
},
},
connect: {
livereload: {
options: {
port: 9013,
livereload: true,
hostname: 'localhost',
open: true,
base: [
'dist'
]
}
}
}
});
// tasks
grunt.registerTask('build', [ 'copy', 'less', 'browserify:app' ]);
grunt.registerTask('auto-build', [
'copy',
'less',
'browserify:watch',
'connect:livereload',
'watch'
]);
grunt.registerTask('default', [ 'build' ]);
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/chensiqima/activiti-designer.git
git@gitee.com:chensiqima/activiti-designer.git
chensiqima
activiti-designer
activiti-designer
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385