1 | 'use strict';
|
2 |
|
3 | var Plugin = require('./plugin');
|
4 | var relativeRequire = require('process-relative-require');
|
5 |
|
6 | function TemplatePlugin () {
|
7 | this.type = 'template';
|
8 | this._superConstructor.apply(this, arguments);
|
9 | }
|
10 |
|
11 | TemplatePlugin.prototype = Object.create(Plugin.prototype);
|
12 | TemplatePlugin.prototype.constructor = TemplatePlugin;
|
13 | TemplatePlugin.prototype._superConstructor = Plugin;
|
14 |
|
15 | TemplatePlugin.prototype.toTree = function(tree) {
|
16 | return relativeRequire(this.name).call(null, tree, {
|
17 | extensions: this.ext,
|
18 | module: true
|
19 | });
|
20 | };
|
21 |
|
22 |
|
23 | module.exports = TemplatePlugin;
|
24 |
|