Create a custom vue-cli webpack template

It's easier than you might think to create a custom template for quickly scaffolding your VueJS projects with WebPack.

After you have finished this quick tutorial, you will be able to scaffold a customized app based off the official vuejs webpack template.

Here's the steps:

Create a new template

  1. fork the https://github.com/vuejs-templates/webpack repo
  2. rename the forked repo (optional, but recommended)
  3. edit the contents of template to reflect your desired project content
  4. commit and push changes

Use your template

vue init my-username/my-repo myproject

and that's it!

Some things you can do now:

  • Create a template with the standard VueJS ecosystem (vue-router, vuex) pre-configured
  • Create a template for building a component library which publishes to docs instead of dist (see: Documenting your VueJS project with Github Pages
  • Create a template for scaffolding mobile apps using your preferred mobile UI framework and publishing via Cordova (link coming soon ...)
  • ...

Resources