Skip to content

v2.6.0

Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 20 Dec 19:08
· 3531 commits to dev since this release

New

  • In meta.js, the default field for a prompt can now be a function which will receive the answers data as the argument, which enables usage like the following:

    module.exports = {
      prompts: {
        library: {
          type: 'string',
          required: true,
          message: 'Library name for browser usage',
          default (answers) {
            if (answers.name) {
              return kebabToCamel(answers.name)
            } else {
              return ''
            }
          }
        }
      }
    }