mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 10:06:40 +02:00
initial setup for editor page to generate graph through textarea input
This commit is contained in:
25
gulpfile.js
25
gulpfile.js
@@ -1,5 +1,7 @@
|
||||
var gulp = require('gulp');
|
||||
var path = require('path');
|
||||
var jison = require('gulp-jison');
|
||||
var less = require('gulp-less');
|
||||
var shell = require('gulp-shell');
|
||||
var concat = require('gulp-concat');
|
||||
var uglify = require('gulp-uglify');
|
||||
@@ -46,6 +48,16 @@ gulp.task('coverage', function (cb) {
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('less', function () {
|
||||
gulp.src(['./editor/css/editor.less'])
|
||||
.pipe(less({
|
||||
generateSourceMap: false, // default true
|
||||
paths: [ path.join(__dirname, 'less', 'includes') ]
|
||||
}))
|
||||
.pipe(concat('editor.css'))
|
||||
.pipe(gulp.dest('./editor/css/'));
|
||||
});
|
||||
|
||||
var browserify = require('gulp-browserify');
|
||||
|
||||
// Basic usage
|
||||
@@ -60,6 +72,19 @@ gulp.task('slimDist', function() {
|
||||
.pipe(gulp.dest('./dist/'));
|
||||
});
|
||||
|
||||
|
||||
// Build editor
|
||||
gulp.task('editor', function() {
|
||||
/*gulp.src(['src/editor.js'])
|
||||
.pipe(browserify())
|
||||
.pipe(concat('main.js'))
|
||||
.pipe(gulp.dest('./editor/'));*/
|
||||
return gulp.src(['node_modules/d3/d3.min.js','node_modules/dagre-d3/dist/dagre-d3.min.js','dist/mermaid.slim.js','src/editor.js'])
|
||||
.pipe(concat('build.js'))
|
||||
.pipe(gulp.dest('./editor/'));
|
||||
});
|
||||
|
||||
|
||||
// Basic usage
|
||||
gulp.task('fullDist', ['slimDist'], function() {
|
||||
// Single entry point to browserify
|
||||
|
Reference in New Issue
Block a user