UNPKG

@nuxt/module-builder

Version:

Complete solution for building Nuxt modules

27 lines (26 loc) 931 B
#!/usr/bin/env node import { n as name, r as version, t as description } from "./package-1Cra3U-o.mjs"; import { defineCommand, runMain } from "citty"; import { consola } from "consola"; //#region src/cli.ts const _rDefault = (r) => r && typeof r === "object" && "default" in r ? r.default : r; runMain(defineCommand({ meta: { name, description, version }, subCommands: { prepare: () => import("./prepare-DSOOmWt_.mjs").then((n) => n.n).then(_rDefault), build: () => import("./build-Ach6kRrL.mjs").then((n) => n.n).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"); } } })); //#endregion export {};