Giter VIP home page Giter VIP logo

rimu's Introduction

Rimu Markup

Rimu is a readable-text to HTML markup language inspired by AsciiDoc and Markdown.

At its core Rimu is a simple readable-text markup similar in scope to Markdown, but with two additional areas of functionality (both built into the Rimu markup syntax):

  1. Markup generation can be customized and extended.
  2. Rimu includes a simple, flexible macro language.

In addition, a subset of Rimu is compatible with a subset of Markdown and Rimu has been ported to a number of languages and runtime environments.

Learn more

Read the documentation and experiment with Rimu in the Rimu Playground or open the rimuplayground.html file locally in your browser.

See the Rimu Change Log for the latest changes.

NOTE: The remainder of this document is specific to the TypeScript implementation for Node.js, Deno and browser platforms.

Quick start

Try the Rimu library in the npm Runkit page:

  1. Open the Rimu npm Runkit page in your browser.
  2. Paste in this code then press the Run button.
const rimu = require("rimu")
const html = rimu.render('Hello *Rimu*!')

This will output "<p>Hello <em>Rimu</em>!</p>".

Installing and using Rimu

Node.js

Use npm to install the Node.js Rimu library module and the rimuc CLI:

npm install -g rimu

Run a test from the command prompt to check the rimuc CLI command is working:

echo 'Hello *Rimu*!' | rimuc

This should print:

<p>Hello <em>Rimu</em>!</p>

Deno

Deno modules don't need explicit installation just import the module URL, for example:

import * as rimu from "https://deno.land/x/[email protected]/mod.ts";

console.log(rimu.render("Hello *Rimu*!"));

Use the Deno install command to install the Rimu CLI executable. The following example creates the CLI executable named rimudeno in $HOME/.deno/bin/rimudeno:

deno install -A --name rimudeno https://deno.land/x/[email protected]/src/deno/rimuc.ts

Browser

Rimu builds JavaScript ES module files in the ./lib/esm directory along with a bundled version ./lib/esm/rimu.min.js. The rimu.min.js ES module file was bundled by Rollup and minimized with terser. Example usage:

<script type="module">
    import * as rimu from "./rimu.min.js";
    alert(rimu.render("Hello *Rimu*!"));
</script>

Building Rimu and the Rimu documentation

To build Rimu you need to have Deno and Node.js installed.

  1. Install the Git repository from Github.

     git clone https://github.com/srackham/rimu.git
    
  2. Install dependencies:

     cd rimu
     npm install
     deno cache --reload src/deno/rimuc.ts
    
  3. Use the Drake task runner module to build and test Rimu library modules and CLIs for Deno and Node.js platforms:

     deno run -A Drakefile.ts build test
    

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.