@conjurelabs/dir-of-readmes

0.0.5 • Public • Published

Dir of Readmes

This is a simply utility to syncrounously crawl a base directory, find any README.md files, concat them, and write the result to a destination README.md.

It separates each readme with a markdown ---

Install

npm install --save @conjurelabs/dir-of-readmes

Usage

SOURCE_READMES_DIR=somedir DESTINATION_README_PATH=somedest node ./

If you've installed it in your project, and want to call it, you can do so from a bash script. For example:

#! /bin/bash
# assuming this file is /script/make-readme
# within root of project directory

BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
APP_DIR=$BASE/..;

set -e;

# assuming you want to concat all API routes in project's /api
# and save it to project's root /README.md
SOURCE_READMES_DIR=$APP_DIR/api DESTINATION_README_PATH=$APP_DIR/README.md node ./node_modules/@conjurelabs/dir-of-readmes

You can then set up a simple script hook in your package.json

{
  "scripts": {
    "make-readme": "script/make-readme"
  }
}

Then you can run npm run make-readme

Lints

npm run lint

Readme

Keywords

none

Package Sidebar

Install

npm i @conjurelabs/dir-of-readmes

Weekly Downloads

7

Version

0.0.5

License

MIT

Unpacked Size

6.18 kB

Total Files

8

Last publish

Collaborators

  • tmarshall