Roadmarks

Command line

Process a project

Run roadmarks in the project folder. It finds every Markdown file in the folder and its subfolders, and fills in each Roadmarks comment:

roadmarks

To process another folder, pass it with -d:

roadmarks -d /path/to/my/project

Process one file

To process a single file, pass it with -f:

roadmarks -f docs/guide.md

Options

Option Description
-d, --dir <path> The project folder. The default is the current folder.
-f, --file <path> Process one file instead of the whole project.
-v, --verbose Write more output. Repeat it, as -vv or -vvv, for more detail.
--verbose2, --verbose3 The same as -vv and -vvv.
-h, --help Print the usage instructions.

Files that Roadmarks skips

Roadmarks reads every file that ends in .md, in any letter case. It skips these files:

  • Files in node_modules.
  • Files in folders whose names start with a dot, such as .github.
  • Files that the .gitignore file in the project folder lists.
  • Folders that hold their own .git or .hg repository.
  • Files that match a line in .roadmarksignore.

The .roadmarksignore file

To skip more files, create a .roadmarksignore file in the folder where you run roadmarks. Write one regular expression on each line. Roadmarks tests each expression against the file path, relative to the project folder, with forward slashes.

node_modules
^test/
^vendor/

A .roadmarksignore file replaces the default list, so keep the node_modules line.

Run it before each commit

To keep the navigation up to date, run Roadmarks from a Git pre-commit hook or a build script, then commit the files that it changed.

View this page on GitHub