Configuration

You can specify custom configuration using .automdrc or automd.config (with .ts, .mjs, .json, ... powered by unjs/c12)

Syntax

Example: .automdrc

input=DOCS.md

Example: automd.config.js

/** @type {import("automd").Config} */
export default {
  input: "DOCS.md",
};

Available Configs

dir

  • Type: string
  • Default: current working directory

Working directory where paths are resolved from.

You can use --dir to override with CLI.

input

  • Type: string | string[]
  • Default: README.md

Name or path to the input file or files with glob patterns.

You can use --input to override with CLI.

output

  • Type: string
  • Default: input

Name or path of the output files. If not provided, the input file will be overwritten.

ignore

  • Type: string[]
  • Default: ["node_modules", "dist", "/.*"]

Ignore patterns if input is a glob pattern.

watch

  • Type: boolean
  • Default: false

Watch for changes in input files and regenerate output.

onWatch

  • Type: function
  • Default: undefined

Watch callback function, called when files change in watch mode.

generators

  • Type: object
  • Default: {}

A map of generator names to custom generators.