This is heavily influenced by the Vue 2 single file component standards explained in the Vue 2 style guide.
- Separate content/API/logic from presentation markup
- Support using a component library
- Make it easier to read Twig components, especially seeing dependencies and variables
- Reduce friction for devs switching between Vue and Twig
- Make it easier to nest components
- Encourage inline documentation
Use a text expansion tool or something like Hygen to create the new template.