Socket
Socket
Sign inDemoInstall

embed-examples

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embed-examples

Embed examples into README.md


Version published
Maintainers
1
Created
Source

embed-examples

npm version Build Status

Embed examples into README.md

:rocket: Installation

npm install -g embed-examples

:eyes: Overview

Thie module embeds examples into README.md.

For example, put the following file ...

my-lib/README.md)

# my-lib
<!-- embed-examples: examples/foo.js -->

my-lib/examples/foo.js)

const myLib = require('my-lib');
myLib.doSomething();

Executing the following command ...

embed-examples -o ./README.md

README.md is updated as follows!

my-lib/README.md)

# my-lib
<!-- embed-examples: examples/foo.js -->
<!-- embed-example -->
```
const myLib = require('my-lib');
myLib.doSomething();
```
<!-- /embed-example -->

:scroll: Usage

embed-examples [OPTIONS] README_PATH
  • README_PATH
    • Relative path to the README.md
  • OPTIONS
    • --examples-dir $VALUE, -e
      • Base path for finding examples
      • Default: A directory path where README.md is located
    • --newline-character $VALUE, -n
      • Newline character used in markdown. However, do not change the sources of examples.
      • The value is "LF", "CR" or "CRLF"
      • Default: "LF"
    • --overwrite, -o
      • Directly rewrite README.md with path specified
      • Default: Disabled
    • --replacement $VALUE, -r
      • Keywords to replace. Represent value in the form of from,to.
      • Can specify more than one like -r keyword1,replacement1 -r keyword2,replacement2
      • Default: None

Keywords

FAQs

Package last updated on 27 Jan 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc