Inquirer.js icon indicating copy to clipboard operation
Inquirer.js copied to clipboard

question builders for easier and more dynamic workflow (inquirer-builder)

Open gweiermann opened this issue 4 years ago • 0 comments

Hey, I recently built my own little framework on top of inquirer. I don't know if this is wanted, but it could be added to the core.

Here's a little code example

import { password, prompter, text, yesno } from "../package";

const personalInfo = {
    "displayName": text("Set your display name: "),
    "email": text("Whats your email?")
}

const register = {
    "username": text("Username: "),
    "password": password("Password: "),
    "_": yesno("Do you want to setup some personal information?").then(personalInfo)
};

prompter(register).then(console.log);

Links: Github: https://github.com/codinghusi/inquirer-builder NPM: https://www.npmjs.com/package/@gweiermann/inquirer-builder

(some unfinished details are left 🙈 )

gweiermann avatar Mar 14 '21 08:03 gweiermann