a solution for vue-cli custom templates hosted on private/enterprise repositories
this is a command-line tool that provides an easy way to use vue-cli custom templates hosted on private/enterprise repositories; it saves them locally, so we can install from a local path:
vue init ~/.vue-cli-templates/my-awesome-template my-appchoose your preferred method:
for a one-time installation of an arbitrary custom template, no setup is required. skip ahead to the usage section for more details.
this is the most convenient choice when you're dealing with multiple custom templates.
npm i -g vue-cli-template-registryif you don't use NPM, or you're just into typing stuff, you can manually copy the registry script to your local bin directory:
curl -f -O https://raw.githubusercontent.com/eliranmal/vue-cli-template-registry/master/bin/registry.sh install -v -m 0755 ./registry.sh /usr/local/bin/vue-cli-template-registry rm -v ./registry.shif you chose to skip the setup, you can use a single command line to fetch and run the registry:
curl -sf https://raw.githubusercontent.com/eliranmal/vue-cli-template-registry/master/bin/registry.sh | bash -s install <awesome-cli-template>make sure to replace <awesome-cli-template> with your custom template clone URL (or local path).
👌 tip: building your own custom template? add this one-liner to the readme page.
if you did follow the setup, you will find the vue-cli-template-registry command available in the terminal. in any case, the command-line interface arguments and flags are the same.
the first argument can be either install, uninstall or update, and the second is used for passing in the custom template source, either in the form of a github clone URL, or a local path pointing at your custom template project.
for more details use the -h flag.