mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Break out dagre-d3 dependency
This commit is contained in:
parent
5ad30c86c5
commit
9246df4410
13
gulpfile.js
13
gulpfile.js
@ -68,11 +68,22 @@ gulp.task('less', function () {
|
||||
|
||||
var browserify = require('gulp-browserify');
|
||||
|
||||
var slim_ext_libs = [
|
||||
'dagre-d3',
|
||||
'd3'
|
||||
];
|
||||
|
||||
// Basic usage
|
||||
gulp.task('slimDist', function() {
|
||||
// Single entry point to browserify
|
||||
return gulp.src('src/main.js')
|
||||
.pipe(browserify())
|
||||
.pipe(browserify({standalone: 'mermaid'}))
|
||||
.on('prebundle', function(bundle) {
|
||||
// Keep these external for the slim version.
|
||||
slim_ext_libs.forEach(function(lib) {
|
||||
bundle.external(lib);
|
||||
});
|
||||
})
|
||||
.pipe(rename('mermaid.slim.js'))
|
||||
.pipe(gulp.dest('./dist/'))
|
||||
.pipe(uglify())
|
||||
|
Loading…
x
Reference in New Issue
Block a user