g.mjs 369 B

123456789101112131415
  1. #!/usr/bin/env node
  2. import fs from 'fs'
  3. import path from 'path'
  4. import inquirer from 'inquirer'
  5. import { input, checkbox } from '@inquirer/prompts'
  6. const name = await input({
  7. message: 'What is your name?',
  8. initial: 'John Doe'
  9. })
  10. const items = await checkbox({
  11. message: 'Select toppings',
  12. choices: ['foo', 'bar', 'baz']
  13. })
  14. console.log(`Hello ${name}!`)