'use strict';

var TranslateHelperName = require('./lib/plugins/translate-helper-name');

module.exports = {
  name: 'ember-page-title',

  setupPreprocessorRegistry: function (_, registry) {
    registry.add('htmlbars-ast-plugin', {
      name: 'translate-title-helper-to-page-title-helper',
      plugin: TranslateHelperName,
      baseDir: function() {
        return __dirname;
      }
    });
  }
};

'use strict';

module.exports = {
  name: 'ember-page-title',

  setupPreprocessorRegistry(_, registry) {
    const plugin = this._buildPlugin();

    plugin.parallelBabel = {
      requireFile: __filename,
      buildUsing: '_buildPlugin',
      params: {}
    };

    registry.add('htmlbars-ast-plugin', plugin);
  },

  _buildPlugin() {
    return {
      name: 'translate-title-helper-to-page-title-helper',
      plugin: require('./lib/plugins/translate-helper-name'),
      baseDir() {
        return __dirname;
      }
    };
  }
};

Allow for parallel babel builds (#159)