MCPcopy
hub / github.com/infinitered/ignite / validateGenerator

Function validateGenerator

src/tools/generators.ts:43–64  ·  view source on GitHub ↗
(generator?: string)

Source from the content-addressed store, hash-verified

41}
42
43function validateGenerator(generator?: string) {
44 const generators = installedGenerators()
45
46 if (!generators.includes(generator)) {
47 warning(`⚠️ Generator "${generator}" isn't installed.`)
48 p()
49
50 if (availableGenerators().includes(generator)) {
51 direction("Install the generator with:")
52 p()
53 command(`npx ignite-cli generate ${generator} --update`)
54 p()
55 direction("... and then try again!")
56 } else {
57 direction("Check your spelling and try again")
58 }
59
60 return false
61 }
62
63 return true
64}
65
66// eslint-disable-next-line @typescript-eslint/no-unused-vars
67export function showGeneratorHelp(toolbox: GluegunToolbox) {

Callers 2

runGeneratorFunction · 0.85
frontMatterDirectoryDirFunction · 0.85

Calls 6

warningFunction · 0.90
pFunction · 0.90
directionFunction · 0.90
commandFunction · 0.90
installedGeneratorsFunction · 0.85
availableGeneratorsFunction · 0.85

Tested by

no test coverage detected