generator
generator copied to clipboard
Variables – Default to environment variables
Would make it super fast if I could just hit enter for some of the prompts.
GENERATOR_AUTHOR=drk
=> __author__
And something like?
> generate -t npm -n test
author (drk):
Agreed. What do you think is a sensible syntax for defaults? I'm not sure if env variables is the right approach because the mapping isn't explicit. Could something like __author(drk)__
work?
Unless of course the environment was simply importing an object of defaults. :wink:
Oh yeah that'd be cool.
~/.generator/defaults.json
?
Could also pass in as an option per call generate -t npm -n my-mod -d /some/defaults.json
That makes the most sense to me.
Look for -d /some/defaults.json
else look for ~/.generator/defaults.json
else proceed
Defaults via the CLI should extend the ~/.generator/defaults.json
IMO. Thoughts?
Oh yeah that would be really neat.