Finalizing GitGraph with directives, theming & docs

This commit is contained in:
ashishj
2022-03-31 19:37:36 +02:00
parent f6421734a2
commit 12c63ff007
8 changed files with 345 additions and 36 deletions

View File

@@ -1,5 +1,7 @@
import { log } from '../../logger';
import { random } from '../../utils';
import mermaidAPI from '../../mermaidAPI';
import * as configApi from '../../config';
let commits = {};
let head = null;
let branches = { main: head };
@@ -11,6 +13,10 @@ function getId() {
return random({ length: 7 });
}
export const parseDirective = function (statement, context, type) {
mermaidAPI.parseDirective(this, statement, context, type);
};
// /**
// * @param currentCommit
// * @param otherCommit
@@ -354,6 +360,8 @@ export const commitType = {
};
export default {
parseDirective,
getConfig: () => configApi.getConfig().gitGraph,
setDirection,
setOptions,
getOptions,