@miniflare/cli-parser
CLI option parsing module for
Miniflare: a fun, full-featured,
fully-local simulator for Cloudflare Workers. See
💻 Using the CLI for more details.
Example
import { buildHelp, parseArgv } from "@miniflare/cli-parser";
import { BuildPlugin } from "@miniflare/core";
import { KVPlugin } from "@miniflare/kv";
const plugins = { BuildPlugin, KVPlugin };
const help = buildHelp(plugins, "exec");
console.log(help);
const options = parseArgv(plugins, [
"--build-command",
"npm run build",
"--kv-persist",
]);
console.log(options);