1.0.4 • Published 2 years ago

examplegen v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

examplegen

Generate markdown documentation from your tests

Installation

yarn add examplegen

How to use

Given a test file ending in .test.ts with the following contents

describe('example:DocName', () => {
  it('example:Hello World', () => {
    console.log('hello world!');
  });
});

Running the following command will generate the following markdown

examplegen --in ./src --out ./ --ignore *node_modules*

DocName.md


Hello World

console.log('hello world!');

Configuration

OptionDefault ValueDescription
titleDocumentationThe title to display in the index page
in./The starting directory to search files in
out./The out directory to place the generated files
ignoreundefinedA regex expression of files to ignore
outDirNameexamplesThe generated directory name
include/.test.ts/A regex expression of files to include
describePrefixexample:The prefix in the the describe description to look for
includeIndexPagetrueGenerates an additional markdown page indexing all docs
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago