diff --git a/htmlbars-plugins/v-get.js b/htmlbars-plugins/v-get.js
index da4aea2e..4840846f 100644
--- a/htmlbars-plugins/v-get.js
+++ b/htmlbars-plugins/v-get.js
@@ -81,27 +81,6 @@ var plugin = function ({ syntax }) {
};
};
-// Legacy implementation
-function VGet(options) {
- this.options = options;
- this.syntax = null; // set by HTMLBars
-}
-
-VGet.prototype.transform = function (ast) {
- var context = this;
- var walker = new this.syntax.Walker();
-
- walker.visit(ast, function (node) {
- let validNodeTypes = ['BlockStatement', 'MustacheStatement', 'ElementNode'];
-
- if (validNodeTypes.indexOf(node.type) > -1) {
- processNode(node, context.syntax);
- }
- });
-
- return ast;
-};
-
function processNode(node, syntax) {
var type = node.type;
node = unwrapNode(node);
@@ -227,7 +206,4 @@ function unwrapNode(node) {
}
}
-module.exports = {
- plugin: plugin,
- legacy: VGet,
-};
+module.exports = plugin;
diff --git a/index.js b/index.js
index 22bf9404..6a3af9f3 100644
--- a/index.js
+++ b/index.js
@@ -4,27 +4,23 @@ module.exports = {
name: require('./package').name,
setupPreprocessorRegistry: function (type, registry) {
- const plugin = this._buildPlugin();
-
- plugin.parallelBabel = {
- requireFile: __filename,
- buildUsing: '_buildPlugin',
- params: {},
- };
-
- registry.add('htmlbars-ast-plugin', plugin);
+ registry.add('htmlbars-ast-plugin', this._buildPlugin());
},
_buildPlugin() {
- // We may need to use VGet.legacy for older versions
- const VGet = require('./htmlbars-plugins/v-get');
+ const vGetPlugin = require('./htmlbars-plugins/v-get');
return {
name: 'v-get',
- plugin: VGet.plugin,
baseDir: function () {
return __dirname;
},
+ parallelBabel: {
+ requireFile: __filename,
+ buildUsing: '_buildPlugin',
+ params: {},
+ },
+ plugin: vGetPlugin,
};
},
};