@hiogawa/inline-template

0.0.1-pre.5 • Public • Published

inline-template

A simple templating system where both template input and output can be managed in a single file.

%template-input-start:test%

  Some text and {%shell ... %}

%template-input-end:test%

%template-output-start:test%

  Anything inside this range will be replaced with above input and its shell code output

%template-output-end:test%

See how this --help is generated in ./README.md.

$ inline-template --help
inline-template/0.0.1-pre.5

Usage:
  $ inline-template [options] <file>

Expand inline template

Positional arguments:
  file    Input file

Options:
  --dry        Print instead of updating in-place
  --cwd=...    Working directory to execute shell code interpolation

Inspired by mdocs, the primary purpose is to automatically update readme files, which typically contain sample code and its output.

examples

Readme

Keywords

none

Package Sidebar

Install

npm i @hiogawa/inline-template

Weekly Downloads

1

Version

0.0.1-pre.5

License

MIT

Unpacked Size

19.4 kB

Total Files

5

Last publish

Collaborators

  • hiogawa