Reputation: 619
I see in the vue-cli setup something like this (meta.js)
user@ny-laptop ~/Documents/
> $ vue init webpack my-project
? Project name hi
? Project description how do i get this menu?
? Author (user <[email protected]>)
...etc
How does one go about creating a menu based configuration like this for a new webpack project? I have a core template that will have a lot of options, being able to select ahead of time would be very helpful.
thanks
Upvotes: 1
Views: 84
Reputation: 135752
You do it by adding properties to the meta.js
.
Fork https://github.com/vuejs-templates/webpack
IMPORTANT: Make sure you are at master
branch and commit.
meta.js
file, adding properties.weather
question: commit here.Now use vue init
Example:
vue init acdcjunior/webpack-vue-template my-project-from-my-template
Example output (notice second question):
$ vue init acdcjunior/webpack-vue-template my-project-from-my-template
? Project name my-project-from-my-template
? How's the weather today? Very nice, thanks.
? Project description A Vue.js project template by acdcjunior
...
The created properties can be used in the templates:
/template
folder.This is valid for Vue-cli v2.x.
Upvotes: 1