include-file-cli
v1.0.1
Published
A Node.js library to build a documentation file by "including" other text files.
Downloads
11
Maintainers
Readme
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.