mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 14:29:25 +02:00
Merge branch 'master' of https://github.com/knsv/mermaid
Conflicts: gulpfile.js
This commit is contained in:
14
gulpfile.js
14
gulpfile.js
@@ -10,8 +10,12 @@ var rename = require('gulp-rename');
|
|||||||
var istanbul = require('gulp-istanbul');
|
var istanbul = require('gulp-istanbul');
|
||||||
var bump = require('gulp-bump');
|
var bump = require('gulp-bump');
|
||||||
var tag_version = require('gulp-tag-version');
|
var tag_version = require('gulp-tag-version');
|
||||||
var dox = require("gulp-dox");
|
var jshint = require('gulp-jshint');
|
||||||
var markdown = require("metalsmith-markdown");
|
var stylish = require('jshint-stylish');
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
scripts: ['./src/*.js']
|
||||||
|
};
|
||||||
|
|
||||||
gulp.task('jison2', function() {
|
gulp.task('jison2', function() {
|
||||||
return gulp.src('./src/*.jison')
|
return gulp.src('./src/*.jison')
|
||||||
@@ -155,3 +159,9 @@ gulp.task('patch', function() { return inc('patch'); })
|
|||||||
gulp.task('feature', function() { return inc('minor'); })
|
gulp.task('feature', function() { return inc('minor'); })
|
||||||
gulp.task('release', function() { return inc('major'); })
|
gulp.task('release', function() { return inc('major'); })
|
||||||
|
|
||||||
|
// Using gulp-jshint and jshint-stylish
|
||||||
|
gulp.task('lint', function() {
|
||||||
|
return gulp.src(paths.scripts)
|
||||||
|
.pipe(jshint())
|
||||||
|
.pipe(jshint.reporter(stylish));
|
||||||
|
});
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
"gulp-istanbul": "^0.4.0",
|
"gulp-istanbul": "^0.4.0",
|
||||||
"gulp-jasmine": "~1.0.1",
|
"gulp-jasmine": "~1.0.1",
|
||||||
"gulp-jison": "~1.0.0",
|
"gulp-jison": "~1.0.0",
|
||||||
|
"gulp-jshint": "^1.9.0",
|
||||||
"gulp-less": "^1.3.6",
|
"gulp-less": "^1.3.6",
|
||||||
"gulp-rename": "~1.2.0",
|
"gulp-rename": "~1.2.0",
|
||||||
"gulp-shell": "^0.2.10",
|
"gulp-shell": "^0.2.10",
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
"he": "^0.5.0",
|
"he": "^0.5.0",
|
||||||
"jasmine": "~2.0.1",
|
"jasmine": "~2.0.1",
|
||||||
"jison": "~0.4.15",
|
"jison": "~0.4.15",
|
||||||
|
"jshint-stylish": "^1.0.0",
|
||||||
"karma": "~0.12.20",
|
"karma": "~0.12.20",
|
||||||
"karma-chrome-launcher": "~0.1.5",
|
"karma-chrome-launcher": "~0.1.5",
|
||||||
"karma-jasmine": "~0.2.1",
|
"karma-jasmine": "~0.2.1",
|
||||||
|
@@ -55,7 +55,8 @@ exports.addVertex = function (id, text, type, style) {
|
|||||||
exports.addLink = function (start, end, type, linktext) {
|
exports.addLink = function (start, end, type, linktext) {
|
||||||
//console.log('Got edge', start, end);
|
//console.log('Got edge', start, end);
|
||||||
var edge = {start: start, end: end, type: undefined, text: ''};
|
var edge = {start: start, end: end, type: undefined, text: ''};
|
||||||
var linktext = type.text;
|
linktext = type.text;
|
||||||
|
|
||||||
if (typeof linktext !== 'undefined') {
|
if (typeof linktext !== 'undefined') {
|
||||||
edge.text = linktext;
|
edge.text = linktext;
|
||||||
}
|
}
|
||||||
@@ -204,4 +205,3 @@ exports.clear = function () {
|
|||||||
exports.defaultStyle = function () {
|
exports.defaultStyle = function () {
|
||||||
return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
|
return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -24,4 +24,4 @@ module.exports.detectType = function(text,a){
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "graph";
|
return "graph";
|
||||||
}
|
};
|
||||||
|
Reference in New Issue
Block a user