UNPKG

612 BJavaScriptView Raw
1// Generated by CoffeeScript 1.10.0
2(function() {
3 var fs, path, skeemas, validate, yaml;
4
5 fs = require('fs');
6
7 path = require('path');
8
9 skeemas = require('skeemas');
10
11 yaml = require('js-yaml');
12
13 validate = function(config) {
14 var config_schema, crystal_path;
15 crystal_path = path.resolve(__dirname + "/../..");
16 config_schema = yaml.safeLoad(fs.readFileSync(crystal_path + "/.autocode/config.yml"));
17 config_schema = config_schema.exports.ConfigSchema.schema;
18 validate = skeemas.validate(config, config_schema);
19 return validate;
20 };
21
22 module.exports = validate;
23
24}).call(this);