mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.54k stars 243 forks source link

Glob pattern support for input files #24

Open raduGaspar opened 4 years ago

raduGaspar commented 4 years ago

If would be nice to be able to run a single command that takes multiple input files (glob patterns). Imagine a package.json build script that would allow the following:

mmdc -i *.mmd mmdc -i path-to-folder/*.mmd mmdc -i path-to-folder/**/*.mmd

Any plans to release support for something like this?

MindaugasLaganeckas commented 4 years ago

No plans at the moment. If you create a PR, I will gladly review 😀

Isk1n commented 4 years ago

As a workaround you can use https://www.npmjs.com/package/glob-run . So build script looks like this:

  "scripts": {
    "build": "glob-run mmdc -i path-to-folder/**/*.mmd"
  }