grunt-init icon indicating copy to clipboard operation
grunt-init copied to clipboard

Values from defaults.json only applied to build-in prompts

Open toonketels opened this issue 11 years ago • 0 comments

Background

As i create a custom prompt in my template.js like:

 {
    name: 'langcode',
    message: 'The language of the default index.html',
    default: 'en',
    warning: 'It must be an 2 character language code.'
 }

It will always get the value "en" as the default. Even though I added "langcode to my _defaults.json".

Expected behaviour

It should use the value from the defaults.json as its default value if the key "langcode" is present in defaults.json

Extra info

  • same thing happends if I make the defaults a function instead of a string.
  • the defaults.json is loaded because the values are used in different prompts in the same template.js

toonketels avatar May 15 '13 10:05 toonketels