a solution for installing vue-cli custom templates hosted on private/enterprise repositories
this is a command-line tool that enables the usage of vue-cli custom templates hosted on private/enterprise repositories [1].
it stores the templates locally, so we can install them from a local path. for example:
vue init ~/.vue-cli-templates/my-awesome-template my-app
choose 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-registry
if 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 -L -f -O https://raw.github.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.sh
if you chose to skip the setup, you can use a single command line to fetch and run the registry [2]:
curl -Lsf https://raw.github.com/eliranmal/vue-cli-template-registry/master/bin/registry.sh | bash -s install <awesome-cli-template>
👌 tip: building your own custom template? add this one-liner to the readme page.
if you followed the setup, you will find the vue-cli-template-registry
command available in the terminal.
it can be run with the same arguments [2]:
vue-cli-template-registry install <awesome-cli-template>
the first argument is the registry command, and can be either install
, uninstall
or update
.
the second is for passing the custom template source, either in the form of a github clone URL, or a local path.
for more details use the -h
flag.
- at the time of writing, vue-cli does not work for such repositories (see this issue). if/when this issue is resolved, vue-cli-template-registry will become obsolete.
- make sure to replace
<awesome-cli-template>
with your custom template clone URL (or local path).