如图这样,空格勾选,上下移动光标,回车确定
想知道怎么实现的
光阴似箭催人老,日月如移越少年。
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.
grunt
yo
问答
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 yoinitialization project
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
andyo
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