Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --preset option #493

Open
sinedied opened this issue Aug 16, 2019 · 0 comments
Open

Add --preset option #493

sinedied opened this issue Aug 16, 2019 · 0 comments

Comments

@sinedied
Copy link
Member

As more and more options are added to the generator (and more are to come!), it can become tedious to quickly setup a project, especially for a quick demo or if you want to generate multiple projects at once.

A simple way to fix that would be to add a --preset <name> option so that we can quickly generate apps in 1 command and no prompt. Furthermore, it could be use to create you own set of preset in gist, github repo or any url.
The format would be the same JSON was we use to automate tests.

Here's what I have in mind:

  • Syntax: --preset [<name>|<url>|<gist:id>|<github:user/repo[:name]>]
  • No param would present the list of available embedded presets (name + short description)
  • <name> will use the target embedded preset
  • <url> will use the target preset JSON from URL
  • <gist:id> would use the target gist containing JSON
  • <github:user/repo[:name]> is where things gets interesting 😎
    • Target user/repo should contain a presets.json with this format:
    {
      "<preset_name>": {
        "description": "blah",
        "preset": "preset/file.json", // string path to file or inline JSON
        "addons": "addon-firebase addon-custom", // optional list of addons to use
        "registry": "https://private.registry.com" // optional registry to use for addons (default to public npm)
      },
     { ... } // other presets
    }
    • using just github:user/repo would present the list of available presets, and adding :name would target directly the specified addon

This feature idea was inspired by @creal73 suggestion during a lunch 😉

Suggestions and ideas welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant