New v4.0.0+

In daily work, the most common is to write modules and business components. When you open a new view or component every time you need to manually create a new .vue, create a <template>, <script>, <style>, or some problem.

So in the new version, based on plop, several basic templates are provided to facilitate the creation of the new view orcomponent.

Execute the following command:

npm run new

plop

As shown in the previous gif, it is easy to generate the basic code snippet I want by simply pressing Enter several times. This is just a demonstration, you can customize the template according to your needs.

For additional template requirements, you can create a custom template by following the plop documentation and going to the plop-templates directory.

In fact, this feature is similar to what snippets do. If you think the configuration is too complicated, you can install a code fragment based on VSCode such as Vue 2 Snippets.