initial setup for editor page to generate graph through textarea input

This commit is contained in:
IamanimalXI
2014-12-01 20:50:58 +01:00
parent 8261429afb
commit 225560dcdf
10 changed files with 3886 additions and 2 deletions

View File

@@ -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