Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Generate an architectural decision log out of architectural decision records (ADRs).
Generate an architectural decision log out of architectural decision records (ADRs).
Install with npm:
npm install -g adr-log
Usage: adr-log [-d <directory>] [-i] <input>
input: The markdown file to contain the table of contents.
If no <input> file is specified, an index.md file containing the log is created in the current directory.
-i: Edit the <input> file directly, injecting the log at <!-- adrlog -->.
Using only the -i flag, the tool will scan the current working directory for all *.md files and
inject the resulting adr-log into the default index.md file.
(Without this flag, the default is to print the log to stdout.)
-d: Scans the given <directory> for .md files.
(Without this flag, the current working directory is chosen as default.)
-h: Shows how to use this program
Consider a directory consisting of three files (0000-example-1.md
, 0001-example-2.md
, 0002-example-3.md
).
Execute following command:
adr-log -d .
This outputs following log on your console:
* [ADR-0000](0000-example-1.md) - Example 1
* [ADR-0001](0001-example-2.md) - Example 2
* [ADR-0002](0002-example-3.md) - Example 3
Since this is basically a fork of Jon Schlinkert's markdown-toc, you can also choose to insert the log into an existing file.
For this to work the file must contain an opening <!-- adrlog -->
code comment, after which the log will be inserted.
If the file already contains an adrlog surrounded by an opening <!-- adrlog -->
and closing <!-- adrlogstop -->
code comment, the existing is be replaced.
Using -i
alone (adr-log -i
) generates an index.md
file in the current working directory containing the log.
$ adr-log -i
Result in following index.md
:
<!-- adrlog -->
* [ADR-0000](0000-example-1.md) - Example 1
* [ADR-0001](0001-example-2.md) - Example 2
* [ADR-0002](0002-example-3.md) - Example 3
<!-- adrlogstop -->
index
or date
properties in frontmatternode cli.js
to execute the CLI.
Also works with relative directgories.
E.g., node ../../../adr-log/cli.js -d .
runs adr-log and outputs the result to the console.cli.js
.adr-tools is the most prominent related tool.
It supports generating an ADR log by using adr generate toc
.
An example to can be investigated at https://github.com/npryce/adr-tools/blob/master/tests/generate-contents.expected.
The difference to adr-tools is
npm
and thus more easy to install.Copyright © 2017 Tino Stadelmaier, Oliver Kopp, Armin Hüneburg, Tobias Wältken.
Released under the MIT License.
[2.2.0] – 2020-10-22
-p
- prefix for each ADR file path in log (useful when ADRs are in sub sub directory)-e
option to specify glob pattern for files to be excludedindex
or date
properties in frontmatter*
instead of -
FAQs
Generate an architectural decision log out of architectural decision records (ADRs).
The npm package adr-log receives a total of 4,830 weekly downloads. As such, adr-log popularity was classified as popular.
We found that adr-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.