Skip to content

Vue CLI docs: Please specify the options syntax on "Plugin Developers" #5474

Open
@richardeschloss

Description

@richardeschloss

What problem does this feature solve?

So, people who may have been comfy with the old Vue CLI 2.x and "vue init" were used to scaffolding the templates using template options with curly "{" and "}". But with the new CLI, to get the same simple functionality, the user has to use ERB style template syntax.

So, if say I had a README.md file and prompted the user for project name:

Before:
Name is {{ name }} // Works for 2.x

Now:
Name is <%= name > // Works for 4.x

This syntax would be extremely useful on https://cli.vuejs.org/dev-guide/plugin-dev.html#creating-new-templates, especially in: https://cli.vuejs.org/dev-guide/plugin-dev.html#prompts. While this may be completely obvious to many, it wasn't so obvious to me.

What does the proposed API look like?

Please update the docs in the link above and also in the API.render docs: https://cli.vuejs.org/dev-guide/generator-api.html#render

An example would be extremely useful. The docs can be made much more helpful with more examples to make it more inviting, especially to those who may be new to the latest version.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions