Skip to content

Adding a New Component

For convenience, StarterStack includes a Hygen.io code generator to create a scaffold for a new component. This includes it's testing .spec file as well.

sh
cd /frontend
hygen component-generator new HelloWorld

This command will generate the following scaffold component located at: /frontend/components/helloworld/Helloworld.vue

/frontend/components/__tests__/helloworld/Helloworld.spec.js

You can use this base scaffold as a starting point. Now you just need to implement your component and testing logic.