icerockdev / shaper

File structure generation tool from templates on Handlebars
Apache License 2.0
12 stars 8 forks source link

Override global properties by CLI app input #7

Closed Alex009 closed 3 years ago

Alex009 commented 3 years ago

Implement template wizard - we pass input config with output directory, then application read input config's global properties and request input of values, with showing current value as default. for example:

config:

globalParams:
  packageName: dev.icerock.shaper.sample.kmm.auth
  moduleName: Auth

CLI work:

Input packageName value.
Default: dev.icerock.shaper.sample.kmm.auth (Press enter to skip change)
<enter>
packageName=dev.icerock.shaper.sample.kmm.auth

Input moduleName value.
Default: Auth (Press enter to skip change)
Authorization<enter>
moduleName=Authorization

so if we not want change anything - we just press enter multiple times. but if we want change something - we not should change config file, but just input required value in CLI execution