mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
Test mermaidAPI
This commit is contained in:
3
dist/demo/index.js
vendored
3
dist/demo/index.js
vendored
@@ -1,4 +1,5 @@
|
||||
const api = require('../mermaidAPI.js')
|
||||
const api = require('../../src/mermaidAPI.js')
|
||||
console.log(api)
|
||||
|
||||
const r = api.parse(`sequenceDiagram
|
||||
loop every day
|
||||
|
@@ -74,19 +74,19 @@ var fatal = function () {}
|
||||
*/
|
||||
exports.setLogLevel = function (level) {
|
||||
if (level < 6) {
|
||||
exports.Log.fatal = console.debug.bind(console, format('FATAL'), 'color:grey;', 'color: red;')
|
||||
exports.Log.fatal = console.log.bind(console, format('FATAL'), 'color:grey;', 'color: red;')
|
||||
}
|
||||
if (level < 5) {
|
||||
exports.Log.error = console.debug.bind(console, format('ERROR'), 'color:grey;', 'color: red;')
|
||||
exports.Log.error = console.log.bind(console, format('ERROR'), 'color:grey;', 'color: red;')
|
||||
}
|
||||
if (level < 4) {
|
||||
exports.Log.warn = console.debug.bind(console, format('WARN'), 'color:grey;', 'color: orange;')
|
||||
exports.Log.warn = console.log.bind(console, format('WARN'), 'color:grey;', 'color: orange;')
|
||||
}
|
||||
if (level < 3) {
|
||||
exports.Log.info = console.debug.bind(console, format('INFO'), 'color:grey;', 'color: info;')
|
||||
exports.Log.info = console.log.bind(console, format('INFO'), 'color:grey;', 'color: info;')
|
||||
}
|
||||
if (level < 2) {
|
||||
exports.Log.debug = console.debug.bind(console, format('DEBUG'), 'color:grey;', 'color: green;')
|
||||
exports.Log.debug = console.log.bind(console, format('DEBUG'), 'color:grey;', 'color: green;')
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user