-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (20 loc) · 609 Bytes
/
index.js
File metadata and controls
27 lines (20 loc) · 609 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module.exports = {
loadPlugin: function() {
module.exports = Object.assign(module.exports, {
'init:config:overwrite:require': function(fileName) {
/**
* Always delay requires, otherwise your plugin will cause trouble
* with db-migrates performance and generates issues to your users.
*/
var yaml = require('js-yaml');
var fs = require('fs');
return yaml.safeLoad(fs.readFileSync(fileName, 'utf8'));
}
});
delete module.exports.loadPlugin;
},
name: 'yaml',
hooks: [
'init:config:overwrite:require'
]
};