UNPKG

@nuxt/module-builder

Version:

Complete solution for building Nuxt modules

26 lines (24 loc) 910 B
#!/usr/bin/env node import { defineCommand, runMain } from 'citty'; import { consola } from 'consola'; import { n as name, d as description, v as version } from './shared/module-builder.617a9be8.mjs'; const _rDefault = (r) => r && typeof r === "object" && "default" in r ? r.default : r; const main = defineCommand({ meta: { name, description, version }, subCommands: { prepare: () => import('./chunks/prepare.mjs').then(_rDefault), build: () => import('./chunks/build.mjs').then(_rDefault) }, setup(context) { const firstArg = context.rawArgs[0]; if (context.cmd.subCommands && !(firstArg && firstArg in context.cmd.subCommands)) { consola.warn("Please specify the `build` command explicitly. In a future version of `@nuxt/module-builder`, the implicit default build command will be removed."); context.rawArgs.unshift("build"); } } }); runMain(main);