MCPcopy Create free account
hub / github.com/formkit/formkit / selectPackage

Function selectPackage

scripts/build.mjs:76–90  ·  view source on GitHub ↗

* Prompt a user to select a package.

()

Source from the content-addressed store, hash-verified

74 * Prompt a user to select a package.
75 */
76async function selectPackage() {
77 const packages = getPackages()
78 packages.unshift('🌎 build all')
79 packages.push('🧨 cancel')
80 const { selection } = await prompts({
81 type: 'select',
82 name: 'selection',
83 message: 'Which FormKit package do you want to build?',
84 choices: packages.map((name) => ({
85 title: name,
86 value: name,
87 })),
88 })
89 await buildPackage(selection)
90}
91
92/**
93 * Build the selected package.

Callers 1

buildPackageFunction · 0.85

Calls 2

getPackagesFunction · 0.90
buildPackageFunction · 0.85

Tested by

no test coverage detected