0.2.0 • Published 2 years ago

textrun-npm v0.2.0

Weekly downloads
57
License
ISC
Repository
-
Last release
2 years ago

Text-Runner Actions for npm

hello

This package provides Text-Runner actions for verifying the documentation of npm packages.

Installation

To use these actions, add this package as a development dependency by running npm i -D textrun-npm or yarn i -D textrun-npm.

Verify installation instructions

The npm/install action verifies installation instructions for an npm package. As an example, let's assume we are testing the documentation of an npm package called foobar. Its package.json file would contain amongst other things:

{
  "name": "foobar"
}

In the documentation of this npm package, for example its README.md file, we want to document how to install this package. It would contain a section that looks something like this:

Install the foobar package by running:

<pre type="npm/install">
$ npm install foobar
</pre>

or with Yarn:

<pre type="npm/install">
$ yarn add foobar
</pre>

Text-Runner verifies that the installation instructions contain the correct name of the npm package.

Verify exported binaries

The npm/exported-executable action verifies documentation of exported binaries of npm packages. Let's say the source code of our foobar package contains an executable file bin/foo, which is listed as a binary in its package.json file:

{
  "name": "foobar",
  "bin": {
    "foo": "bin/foo"
  }
}

The README.md file for the "foobar" package would document this binary something like this:

After you install the "foobar" package, you can run the
<code type="npm/exported-executable">foo</code> command in the terminal.

Verify installed binaries

The npm/installed-executable action verifies binaries installed by other npm packages. Let's say you developer instructions for a codebase that uses the cucumber command provided by the npm [cucumber](https://www.npmjs.com/package/cucumber) package:

To run the end-to-end tests, run
<code type="npm/installed-executable">cucumber</code> in the terminal.
0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

3 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago