cli Usage and Documentation

Documentation and instructions for using .lit from the command line.

Installation

.lit is built on top of [Node.js] and plublished to the NPM repository at @dotlit/dotlit

sh
npm install -g @dotlit/dotlit

Usage

sh
dotlit --help

Commands

Generate | gen | g

Takes an input path and an output path, copies all content from the input to the output transforming Markdown (.md and .lit) files to static html

Currently also starts a local http server on the output but this will move to a dotlit serve command in the near future.

sh
dotlit generate ./src -o ./build

Options

  • -o --output-path 

    Directory to output generated files to. Note: it's possible to input from and output to the same directory.

  • -w --watch 

    Continues to watch the input for any changes and automatically re-generates.

  • -b --base-path

    If you intend to serve the output html application at a sub path of a particular hostname/domain.

Server | serve | s

Not yet Implemented

Use your own favourite http server until then. I quite like http-server

Execute | exec | e

Not yet Implemented

Execute code cells within a .lit file. Intended for Run books etc... See [great article on run books, need to find it again]

Convert | conv | c

Not yet Implemented

Converts a single .lit file to a varienty of formats. Eg: html, json (AST), pdf (TBD).