Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fujiharuka/node-include-file
A Node.js library to build a documentation file by "including" other text files.
https://github.com/fujiharuka/node-include-file
Last synced: 5 days ago
JSON representation
A Node.js library to build a documentation file by "including" other text files.
- Host: GitHub
- URL: https://github.com/fujiharuka/node-include-file
- Owner: FujiHaruka
- License: mit
- Created: 2020-05-17T05:49:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:24:00.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T23:25:46.120Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# include-file-cli
A Node.js library to build a documentation file by "including" other text files.
## Short Usage
```
$ npx include-file-cli
```## Usage
This library supports just one syntax to include other files: `$include `.
For example, here is a `entry.md` file as below.
```markdown
# some-awsome-libraryThis 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.
````markdown
## Installation```
$ npm install some-awesome-ibrary
```
````Then, you can create the `README.md` file by using `include-file` CLI.
```console
$ npx include-file-cli ./entry.md README.md
```Here is the content of `README.md`.
````markdown
# some-awsome-libraryThis 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](./doc) directory.