如图这样,空格勾选,上下移动光标,回车确定
想知道怎么实现的
PHP中文网2017-04-17 14:49:08
It’s troublesome to implement one by yourself. Fortunately, there are enough “giants’ shoulders” in the open source world to step on for us.
You can refer to other node open source libraries. For example, grunt
and yo
provide functions like 问答
in the project initialization function.
Let’s see how they achieve it?
grunt: implemented through the prompt library, click the portal
yo: Implemented through the Inquirer.js library, click on the portal
Attached is a screenshot of the yo
initialization project