Skip to content

A Node.js library to build a documentation file by "including" other text files.

License

Notifications You must be signed in to change notification settings

FujiHaruka/node-include-file

Repository files navigation

include-file-cli

A Node.js library to build a documentation file by "including" other text files.

Short Usage

$ npx include-file-cli <entrypoint_file> <dest_file>

Usage

This library supports just one syntax to include other files: $include <file_path>.

For example, here is a entry.md file as below.

# some-awsome-library

This is a description.

$include ./installation.md

## Lisence

MIT License.

The line $include ./installation.md means that ./installation.md file will be included. Notice that

  • $include declaration must be at the beginning of the line.
  • the included file path is a relative path from the source file.

And here is a installation.md file in the same directory as below.

## Installation

```
$ npm install some-awesome-ibrary
```

Then, you can create the README.md file by using include-file CLI.

$ npx include-file-cli ./entry.md README.md

Here is the content of README.md.

# some-awsome-library

This is a description.

## Installation

```
$ npm install some-awesome-ibrary
```

## Lisence

MIT License.

That's it.

The responsibility of this library is building a file from a entrypoint file including other files. You can use any markup languages or other template engines with it.

You can see an example in this README file itself. It is generated from ./doc directory.

About

A Node.js library to build a documentation file by "including" other text files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published