Render function as mentioned in issue #146, only works in browser context

Updated build scripts
New way for bundling content in dist, tobe tested, currently to be considered beta
This commit is contained in:
knsv
2015-05-26 20:41:53 +02:00
parent 05f3982632
commit b4a96c9b21
35 changed files with 104559 additions and 15040 deletions

35
gulp/tasks/less.js Normal file
View File

@@ -0,0 +1,35 @@
var gulp = require('gulp');
var path = require('path');
var less = require('gulp-less');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
gulp.task('editor-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/'));
});
gulp.task('mermaid-less', function () {
gulp.src(['./src/less/*/mermaid.less'])
.pipe(less({
generateSourceMap: false, // default true
paths: [ path.join(__dirname, 'less', 'includes') ]
}))
.pipe(rename(function (path) {
if(path.dirname === 'default'){
path.basename = 'mermaid';
}else{
path.basename = 'mermaid.' + path.dirname;
}
path.dirname = '';
}))
.pipe(gulp.dest('./dist/'));
});
gulp.task('less',['mermaid-less', 'editor-less']);