2020-06-17 05:54:24 -04:00
|
|
|
import utils from './utils';
|
|
|
|
|
|
|
|
const config = {};
|
2019-07-13 22:50:53 -07:00
|
|
|
|
2019-09-12 12:58:57 -07:00
|
|
|
const setConf = function(cnf) {
|
2019-07-21 02:09:22 -07:00
|
|
|
// Top level initially mermaid, gflow, sequenceDiagram and gantt
|
2020-06-17 05:54:24 -04:00
|
|
|
utils.assignWithDepth(config, cnf);
|
2019-09-12 12:58:57 -07:00
|
|
|
};
|
2019-07-21 02:09:22 -07:00
|
|
|
|
2019-07-13 22:50:53 -07:00
|
|
|
export const setConfig = conf => {
|
2019-09-12 12:58:57 -07:00
|
|
|
setConf(conf);
|
|
|
|
};
|
|
|
|
export const getConfig = () => config;
|
2019-10-11 15:39:50 +02:00
|
|
|
|
|
|
|
const configApi = {
|
|
|
|
setConfig,
|
|
|
|
getConfig
|
|
|
|
// get conf() {
|
|
|
|
// return config;
|
|
|
|
// }
|
|
|
|
};
|
|
|
|
export default configApi;
|