conflakes
Version:
Manager of the configuration, may be depending on the environment, with the ability to import another config files defined inside themselves.
14 lines (10 loc) • 354 B
text/typescript
const yaml = require('js-yaml');
const _ = require('lodash');
var GlobalVariableType = new yaml.Type('tag:yaml.org,2002:js/var', {
kind: 'scalar',
construct: function (path) {
return _.clone(_.get(global, path));
},
});
var GlobalVariableSchema = yaml.Schema.create([ GlobalVariableType ]);
export default GlobalVariableSchema;