mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
22 lines
516 B
TypeScript
22 lines
516 B
TypeScript
import { cyan } from 'colorette'
|
|
import { showHelp } from '../utils/help'
|
|
import { commands, defineNuxtCommand } from './index'
|
|
|
|
export default defineNuxtCommand({
|
|
meta: {
|
|
name: 'help',
|
|
usage: 'nuxt help',
|
|
description: 'Show help'
|
|
},
|
|
invoke (_args) {
|
|
const sections: string[] = []
|
|
|
|
sections.push(`Usage: ${cyan(`npx nuxi ${Object.keys(commands).join('|')} [args]`)}`)
|
|
|
|
console.log(sections.join('\n\n') + '\n')
|
|
|
|
// Reuse the same wording as in `-h` commands
|
|
showHelp({})
|
|
}
|
|
})
|