the cli args for transforming your deno project to a node based project via the buildNpm function.

interface CliArgs {
    dir?: string;
    deno?: string;
    log?:
        | boolean
        | "none"
        | "basic"
        | "verbose";
    dryrun?: boolean;
    install?: any;
    config?: string;
}

Properties

dir?: string

the path to the folder where you wish to create your npm release. if a relative path is provided, then it will be resolved as a path relative to Deno's current working directory. (which is generally where deno.json resides.)

deno?: string

the path to your deno.json file for this project. if a relative path is provided, then it will be resolved as a path relative to Deno's current working directory. (which is also where deno.json generally resides.)

log?:
    | boolean
    | "none"
    | "basic"
    | "verbose"

select logging level:

  • false or "none": skip logging (dnt itself will still log).
  • true or "basic": log what is being carried out at the top level.
  • "verbose": in addition to basic logging, it also logs which files/folders are being copied or generated.
  • undefined: unchange logging from previous state (which is "basic" by default).
dryrun?: boolean

enable dryrun if you wish for nothing to be written onto the the filesystem.

install?: any

should npm install be invoked after the node project's creation? you could also specify the binary-name of the node-installer, such as pnpm, npm, yarn, or provide the binary's path if it is not available in the system-path, such as ~/.pnpm/pnpm or /usr/bin/npm.

  • if you do specify the binary name, then the generated package will be installed.
  • if you specify this option as a true boolean, then the installation will default to using npm for installation.
  • if the you don't provide the install option, or leave it false, then no package installation will occur.

false

config?: string

a path to an npm-build configuration json file that provides additional modifiable parameters. see CliConfigJson for more details on the available extended configurations. in case there is a contradiction between the CliConfigJson setting and the current cli args, the cli arg will take precedence.