ember-apply
    Preparing search index...

    Function transformTemplate

    • Transforms an ember-template file using ember-template-recast. The script at the filePath is read, transformed via the provided plugin, and then written back to the same file.

      This can be used to help migrate components, remove deprecated features, etc

      Parameters

      • filePath: string

        to the file to transform

      • plugin: TransformPluginBuilder

      Returns Promise<void>

      transformTemplate takes an ember-template-recast plugin

      import { ember } from 'ember-apply';

      await ember.transformTemplate('path/to/template.hbs', (env) => {
      return {
      Hash(node) {
      // do something with hash nodes
      }
      }
      });