There are two conditional questions in
questions.js. Just add an
if with a condition expression.
The text prompt for license author will only appear if end user picked
license from previous select prompt. The select prompt for transpiler will only appear if end user picked
'nodejs' are the simplest form of conditional expression.
You can use rich logic in conditional expression with the help of
!, as well as
'nodejs && license' 'jest or jasmine' 'not webpack and requirejs' '!webpack && requirejs' 'a && (b || c)'
'vue-sfc' 'babel && vue-sfc'
The condition expression is used for conditional question/choice/file/folder, plus the condition inside file content preprocess. All these conditions are evaluated through the same tiny expression engine, you will see the familiarity when you read other topics.
Condition on choice is same, just add
if: 'express' to any choice. There is no example in
makesjs/demo2, but you can find plenty in