@codemod-utils/ast-template
v4.0.0
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 @glimmer/syntax to help you parse and transform *.hbs files.
import { AST } from '@codemod-utils/ast-template';
function transform(file: string): string {
const ast = 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 v22 or above
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.
