mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
Refactor or remove some file
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
var gulp = require('gulp')
|
var gulp = require('gulp')
|
||||||
var path = require('path')
|
var path = require('path')
|
||||||
var less = require('gulp-less')
|
var less = require('gulp-less')
|
||||||
var rename = require('gulp-rename')
|
|
||||||
var concat = require('gulp-concat')
|
var concat = require('gulp-concat')
|
||||||
|
|
||||||
gulp.task('editor-less', function () {
|
gulp.task('editor-less', function () {
|
||||||
@@ -14,21 +13,4 @@ gulp.task('editor-less', function () {
|
|||||||
.pipe(gulp.dest('./editor/css/'))
|
.pipe(gulp.dest('./editor/css/'))
|
||||||
})
|
})
|
||||||
|
|
||||||
gulp.task('mermaid-less', function () {
|
gulp.task('less', ['editor-less'])
|
||||||
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'])
|
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
var gulp = require('gulp')
|
var gulp = require('gulp')
|
||||||
var jasmine = require('gulp-jasmine')
|
var jasmine = require('gulp-jasmine')
|
||||||
var shell = require('gulp-shell')
|
|
||||||
var istanbul = require('gulp-istanbul')
|
var istanbul = require('gulp-istanbul')
|
||||||
var qunit = require('gulp-qunit')
|
var qunit = require('gulp-qunit')
|
||||||
var bower = require('gulp-bower')
|
var bower = require('gulp-bower')
|
||||||
|
|
||||||
gulp.task('test', ['coverage', 'tape', 'jasmine', 'qunit'])
|
gulp.task('test', ['coverage', 'jasmine', 'qunit'])
|
||||||
|
|
||||||
gulp.task('jasmine', ['jison', 'lint'], function () {
|
gulp.task('jasmine', ['jison', 'lint'], function () {
|
||||||
return gulp.src(['src/**/*.spec.js'])
|
return gulp.src(['src/**/*.spec.js'])
|
||||||
@@ -17,8 +16,6 @@ gulp.task('jas', function () {
|
|||||||
.pipe(jasmine({ includeStackTrace: true }))
|
.pipe(jasmine({ includeStackTrace: true }))
|
||||||
})
|
})
|
||||||
|
|
||||||
gulp.task('tape', shell.task(['node_modules/.bin/tape ./test/cli_test-*.js']))
|
|
||||||
|
|
||||||
gulp.task('coverage', function (cb) {
|
gulp.task('coverage', function (cb) {
|
||||||
gulp.src(['src/**/*.js', '!src/**/*.spec.js'])
|
gulp.src(['src/**/*.js', '!src/**/*.spec.js'])
|
||||||
.pipe(istanbul()) // Covering files
|
.pipe(istanbul()) // Covering files
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
yarn build-mermaid -- --watch & gulp live-server
|
|
@@ -13,9 +13,6 @@
|
|||||||
});
|
});
|
||||||
$(function(){
|
$(function(){
|
||||||
var graphDefinition = 'graph TB\na-->b';
|
var graphDefinition = 'graph TB\na-->b';
|
||||||
// var cb = function(html){
|
|
||||||
// console.log(html);
|
|
||||||
// }
|
|
||||||
console.log(mermaidAPI.render(graphDefinition));
|
console.log(mermaidAPI.render(graphDefinition));
|
||||||
console.log(mermaidAPI.render('id',graphDefinition));
|
console.log(mermaidAPI.render('id',graphDefinition));
|
||||||
});
|
});
|
||||||
@@ -24,4 +21,4 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,11 +1,8 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
background: #fcfcfe;
|
background: #fcfcfe;
|
||||||
font-family: Helvetica;
|
font-family: Helvetica;
|
||||||
}
|
}
|
||||||
.mermaid {
|
|
||||||
/* width:400px;*/
|
|
||||||
}
|
|
||||||
.actor {
|
.actor {
|
||||||
stroke: #CCCCFF;
|
stroke: #CCCCFF;
|
||||||
fill: #ECECFF;
|
fill: #ECECFF;
|
||||||
@@ -80,4 +77,4 @@ text.actor {
|
|||||||
stroke:none;
|
stroke:none;
|
||||||
font-family: 'trebuchet ms', verdana, arial;
|
font-family: 'trebuchet ms', verdana, arial;
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by knut on 14-12-02.
|
|
||||||
*/
|
|
||||||
const mermaid = require('mermaid')
|
|
||||||
|
|
||||||
console.log('Test page! mermaid version' + mermaid.version())
|
|
Reference in New Issue
Block a user