Giter Club home page Giter Club logo

rdd's Introduction

rdd npm Version build

Preview your Markdown locally as it would appear on GitHub, with live updating

rdd is short for Readme Driven Development.

Quick start

Requires Node.js.

$ ls
README.md
$ npx rdd --open
Serving on 0.0.0.0:8888/README.md

Here we’re using the --open flag to open the rendered Markdown file in our default web browser. The rendered page will be updated automatically whenever we edit and save README.md.

Usage

rdd [file]

Render and serve the given Markdown file

Commands:
  rdd format [files..]  Auto-format the given Markdown files      [aliases: fmt]
  rdd serve [file]      Render and serve the given Markdown file       [default]
  rdd toc [files..]     Insert a table of contents into the given Markdown files

Positionals:
  file                                                                  [string]

Options:
      --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]
  -d, --dark     Enable dark mode                     [boolean] [default: false]
  -f, --format   Auto-format the Markdown file on save[boolean] [default: false]
  -o, --open     Open the rendered file in your default web browser
                                                      [boolean] [default: false]
  -p, --port     Set the preferred port to serve the rendered file
                                                        [number] [default: 8888]

Use <!-- toc --> and <!-- tocstop --> to demarcate where the table of contents should be rendered in your Markdown file.

To “commit” the table of contents to the file, do:

$ npx rdd toc

Installation

$ npm install --global rdd

Known issues

  • Syntax highlighting for code blocks (using Highlight.js) is slightly different from what GitHub actually uses

Prior art

  • Grip is a similar tool written in Python

License

MIT

rdd's People

Contributors

yuanqing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rdd's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.