Socket
Socket
Sign inDemoInstall

@conjurelabs/dir-of-readmes

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @conjurelabs/dir-of-readmes

crawls a directory, concats all readmes, and joins them into one


Version published
Maintainers
1
Install size
53.6 kB
Created

Readme

Source

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

FAQs

Last updated on 18 Jul 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc