@codemod-utils/ast-template
v2.1.5
Published
Utilities for handling *.hbs files as abstract syntax tree
Readme
@codemod-utils/ast-template
Utilities for handling *.hbs files as abstract syntax tree
What is it?
@codemod-utils/ast-template provides methods from ember-template-recast to help you parse and transform *.hbs files.
import { AST } from '@codemod-utils/ast-template';
function transform(file: string): string {
const traverse = AST.traverse();
const ast = traverse(file, {
/* Use AST.builders to transform the tree */
});
return AST.print(ast);
}Documentation
Visit https://codemod-utils.netlify.app/docs/packages/codemod-utils-ast-template.
Compatibility
- Node.js v20 or above
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.
