Skip to content

The markdown-to-reveal.js presentation cli "transpiler"

License

Notifications You must be signed in to change notification settings

edurbrito/revdown-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

revdown-cli

The markdown-to-reveal.js presentation CLI "transpiler"

Motivation

The main goal is to automate the process of generating an HTML presentation from any Markdown file. It can be accomplished with the help of the open source HTML presentation framework reveal.js that comes with a bunch of cool features for creating amazing browser presentations. This tool allows users to generate their presentations in-place from any of their Markdown files.

Dependencies & Features

The main code was written entirely in TypeScript.

It queries the GitHub API to fetch the reveal.js repo, caching the user configurations when needed.

For the CLI interface, inquirer and chalk were used.

Install & Run

Not tested with Windows or Mac. Some (directory) changes may be needed in order to work on these systems.

To install revdown-cli, follow this:

  1. Install Node.js
  2. Clone this repository

git clone https://github.com/edurbrito/revdown-cli.git

  1. Move to the cloned folder

cd revdown-cli

  1. Install all the dependencies & Add it to your bin folder

npm run bin

Note: You may need to guarantee sudo privileges

  1. Now, on any markdown file, on any folder, in order to generate the reveal.js presentation, run

revdown yourmarkdownfile.md

  1. Follow all the instructions until it finishes the presentation generation

    1. If it is the first time or no configurations were previously saved, it will ask you to choose the theme, the plugins, the highlight theme, the markdown configs, etc... Initial configurations

    2. If the last configurations were saved a first prompt will ask if you want to use them again Cached configurations

  2. Open in your favorite browser the yourmarkdownfile.html file that was created

Test

Multiple Unit Tests made with QUnit were created for some of the functions and classes. These tests can be found inside the test folder. To run them:

  1. Install all the dependencies if not done yet

npm install

  1. Run all the unit tests

npm run test

  1. To test the tool with an actual markdown test file (see the example file here), run

npm run test-file

The result can be found at test/example/test.html.

Documentation

There is currently no documentation for the revdown-cli tool. The full reveal.js documentation is available at revealjs.com.

License

MIT licensed

Copyright (C) 2021 Eduardo Brito, https://github.com/edurbrito, and revdown-cli contributors.