Skip to content

Commit ee784fd

Browse files
authored
Merge pull request willyelm#39 from markbrouch/master
🔧 Change plugins to expect array of objects
2 parents 511f10d + f5992d4 commit ee784fd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,9 @@ module.exports = function (source) {
2323
compileDebug: this.debug || false
2424
}, query)
2525
if (options.plugins){
26-
if (typeof options.plugins === 'string') {
26+
if (typeof options.plugins === 'object') {
2727
options.plugins = [options.plugins];
2828
}
29-
if (Array.isArray(options.plugins)) {
30-
options.plugins = options.plugins.map(function (plugin) {
31-
return require(plugin);
32-
});
33-
}
3429
}
3530
let template = pug.compile(source, options)
3631
template.dependencies.forEach(this.addDependency)

0 commit comments

Comments
 (0)