@miniflare/cli-parser
    TypeScript icon, indicating that this package has built-in type declarations

    2.4.0 • Public • Published

    @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); // Usage: exec ...
    
    const options = parseArgv(plugins, [
      "--build-command",
      "npm run build",
      "--kv-persist",
    ]);
    console.log(options); // { buildCommand: "npm run build", kvPersist: true };

    Install

    npm i @miniflare/cli-parser

    DownloadsWeekly Downloads

    17,580

    Version

    2.4.0

    License

    MIT

    Unpacked Size

    23.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • mrbbot