Modernization of build environment, better linting, adjustment after stricter static rules, cleanup of package.json

This commit is contained in:
knsv
2015-10-17 12:46:36 +02:00
parent 632a564158
commit 315923d1d3
33 changed files with 21673 additions and 21181 deletions

View File

@@ -2,15 +2,10 @@
* Created by knut on 14-11-18.
*/
describe('when parsing an info graph it',function() {
var parseError;
var ex;
beforeEach(function () {
ex = require('./parser/example').parser;
ex.yy = require('./exampleDb');
parseError = function(err, hash) {
log.debug('Syntax error:' + err);
};
//ex.yy.parseError = parseError;
});
it('should handle an info definition', function () {

View File

@@ -6,6 +6,7 @@ var message = '';
var info = false;
exports.setMessage = function(txt){
log.debug('Setting message to: '+txt);
message = txt;
};
@@ -22,5 +23,5 @@ exports.getInfo = function(){
};
exports.parseError = function(err,hash){
mermaidAPI.parseError(err,hash);
global.mermaidAPI.parseError(err,hash);
};

View File

@@ -14,14 +14,13 @@ exports.draw = function (txt, id, ver) {
var parser;
parser = exampleParser.parser;
parser.yy = db;
log.debug('Renering example diagram');
// Parse the graph definition
parser.parse(txt);
// Fetch the default direction, use TD if none was found
var svg = d3.select('#'+id);
var textstring = 'mermaid!';
var g = svg.append('g');
g.append('text') // text label for the x axis