From 1c7c1099607c91996b23bbaa774a3c5b3a8d8ea6 Mon Sep 17 00:00:00 2001 From: Tyler Long Date: Sat, 22 Apr 2017 17:13:05 +0800 Subject: [PATCH] Refactor or remove some file --- gulp/tasks/less.js | 20 +------------------- gulp/tasks/test.js | 5 +---- scripts/watch.sh | 3 --- test/examples/apiTest.html | 5 +---- test/seq.css | 7 ++----- test/usageTests/browserifyUsage.js | 6 ------ 6 files changed, 5 insertions(+), 41 deletions(-) delete mode 100644 scripts/watch.sh delete mode 100644 test/usageTests/browserifyUsage.js diff --git a/gulp/tasks/less.js b/gulp/tasks/less.js index 9be400d2a..86b932b68 100644 --- a/gulp/tasks/less.js +++ b/gulp/tasks/less.js @@ -1,7 +1,6 @@ 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 () { @@ -14,21 +13,4 @@ gulp.task('editor-less', function () { .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']) +gulp.task('less', ['editor-less']) diff --git a/gulp/tasks/test.js b/gulp/tasks/test.js index 912440ed2..1561d958a 100644 --- a/gulp/tasks/test.js +++ b/gulp/tasks/test.js @@ -1,11 +1,10 @@ var gulp = require('gulp') var jasmine = require('gulp-jasmine') -var shell = require('gulp-shell') var istanbul = require('gulp-istanbul') var qunit = require('gulp-qunit') var bower = require('gulp-bower') -gulp.task('test', ['coverage', 'tape', 'jasmine', 'qunit']) +gulp.task('test', ['coverage', 'jasmine', 'qunit']) gulp.task('jasmine', ['jison', 'lint'], function () { return gulp.src(['src/**/*.spec.js']) @@ -17,8 +16,6 @@ gulp.task('jas', function () { .pipe(jasmine({ includeStackTrace: true })) }) -gulp.task('tape', shell.task(['node_modules/.bin/tape ./test/cli_test-*.js'])) - gulp.task('coverage', function (cb) { gulp.src(['src/**/*.js', '!src/**/*.spec.js']) .pipe(istanbul()) // Covering files diff --git a/scripts/watch.sh b/scripts/watch.sh deleted file mode 100644 index 445dfe6b9..000000000 --- a/scripts/watch.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -yarn build-mermaid -- --watch & gulp live-server diff --git a/test/examples/apiTest.html b/test/examples/apiTest.html index c2b15148d..012f8b815 100644 --- a/test/examples/apiTest.html +++ b/test/examples/apiTest.html @@ -13,9 +13,6 @@ }); $(function(){ var graphDefinition = 'graph TB\na-->b'; -// var cb = function(html){ -// console.log(html); -// } console.log(mermaidAPI.render(graphDefinition)); console.log(mermaidAPI.render('id',graphDefinition)); }); @@ -24,4 +21,4 @@ - \ No newline at end of file + diff --git a/test/seq.css b/test/seq.css index 6b8f2fb79..e67e5ba5b 100644 --- a/test/seq.css +++ b/test/seq.css @@ -1,11 +1,8 @@ - body { background: #fcfcfe; font-family: Helvetica; } -.mermaid { - /* width:400px;*/ -} + .actor { stroke: #CCCCFF; fill: #ECECFF; @@ -80,4 +77,4 @@ text.actor { stroke:none; font-family: 'trebuchet ms', verdana, arial; font-size:14px; -} \ No newline at end of file +} diff --git a/test/usageTests/browserifyUsage.js b/test/usageTests/browserifyUsage.js deleted file mode 100644 index 9ac47c12b..000000000 --- a/test/usageTests/browserifyUsage.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Created by knut on 14-12-02. - */ -const mermaid = require('mermaid') - -console.log('Test page! mermaid version' + mermaid.version())