Generators

The Aurelia CLI includes generators to scaffold common Aurelia resources. Use the following command pattern:

au generate <resource> <name>

Available resources include:

  • element

  • attribute

  • value-converter

  • binding-behavior

  • task

  • generator

For example, to generate a custom element:

au generate element my-awesome-element

This creates src/resources/elements/my-awesome-element.js (or .ts if using TypeScript).

circle-info

By Aurelia convention, use kebab-case for naming elements, attributes, value converters, and binding behaviors.

You can also create custom generators:

au generate generator my-custom-generator

Last updated

Was this helpful?