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.
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 😉
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:
--preset [<name>|<url>|<gist:id>|<github:user/repo[:name]>
]<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 😎user/repo
should contain apresets.json
with this format:github:user/repo
would present the list of available presets, and adding:name
would target directly the specified addonThis feature idea was inspired by @creal73 suggestion during a lunch 😉
Suggestions and ideas welcome!