1.4.0 • Published 4 months ago

@moaw/cli v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@moaw/cli

NPM version Node version XO code style License

Command line tool to create, preview and export workshops using MOAW platform.

Installation

npm install -g @moaw/cli

Usage

Usage: moaw <command> [options]

Commands:
  n, new <name>      Create a new workshop
  s, serve [<path>]  Preview workshop in target path (default: .)
    -p, --port       Port to listen on (default: 4444)
    -h, --host       Host address to bind to (default: localhost)
    -o, --open       Open in browser (default: false)
  c, convert <file>  Convert asciidoc to markdown
    -a, --attr <json_file>  Attributes to use for conversion
    -d, --dest <file>       Destination file (default: workshop.md)
  b, build [<file>]  Build workshop and process file includes
    -d, --dest <file>       Destination file (default: <file>.build.md)
  l, link [<file>]   Get link to target file (default: workshop.md)
    -r, --repo       Set GitHub repo instead of fetching it from git
    -b, --branch <name>     Set branch name (default: current branch)

General options:
  -v, --version      Show version
  --help             Show this help

Asciidoc to Markdown conversion

AsciiDoc is a markup language that can offer more advanced features than Markdown. However, it is not supported directly by MOAW. This command allows you to convert an AsciiDoc file to Markdown file that can be used with MOAW.

moaw convert my-workshop.adoc -a attributes.json

The attributes.json file is a JSON file that contains the document attributes to use for the conversion.

As MOAW requires specific frontmatter metadata in the Markdown file, you can define this metadata in the attributes.json file using the meta key. For example:

{
  "meta": {
    "short_title": "My workshop",
    "description": "My workshop description",
    "tags": "tag1, tag2",
    "level": "beginner",
    "duration_minutes": 180,
    ...
  }
}

Note that not all AsciiDoc features are supported, and fall back to HTML generation will be used in that case. You can use the --verbose option to see if any unsupported feature is used.

1.4.0

4 months ago

1.3.1

4 months ago

1.3.0

10 months ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago