Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srackham/rimu
Readable text to HTML markup language
https://github.com/srackham/rimu
asciidoc javascript markdown rimu typescript
Last synced: about 12 hours ago
JSON representation
Readable text to HTML markup language
- Host: GitHub
- URL: https://github.com/srackham/rimu
- Owner: srackham
- License: mit
- Created: 2012-12-11T05:14:25.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-02-10T02:42:49.000Z (9 months ago)
- Last Synced: 2024-04-15T00:15:12.493Z (7 months ago)
- Topics: asciidoc, javascript, markdown, rimu, typescript
- Language: TypeScript
- Size: 3.72 MB
- Stars: 41
- Watchers: 8
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://srackham.github.io/rimu/tips.html#markdown-compatible)
and Rimu has been ported to a number of [languages and runtime environments](https://srackham.github.io/rimu/reference.html#rimu-implementations).## Learn more
[Read the documentation](https://srackham.github.io/rimu/) and experiment with Rimu
in the [Rimu Playground](https://srackham.github.io/rimu/rimuplayground.html) or
open the `rimuplayground.html` file locally in your browser.See the Rimu [Change Log](https://srackham.github.io/rimu/changelog.html) for
the latest changes.**NOTE**: The remainder of this document is specific to the
[TypeScript implementation](https://github.com/srackham/rimu) 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](https://npm.runkit.com/rimu) in your browser.
2. Paste in this code then press the _Run_ button.
``` javascript
const rimu = require("rimu")
const html = rimu.render('Hello *Rimu*!')
```
This will output `"Hello Rimu!
"`.## 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:
Hello Rimu!
**Deno**
Deno modules don't need explicit installation just import the module
URL, for example:``` javascript
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](https://github.com/rollup/rollup) and minimized with
[terser](https://github.com/terser/terser). Example usage:``` html
import * as rimu from "./rimu.min.js";
alert(rimu.render("Hello *Rimu*!"));```
## Building Rimu and the Rimu documentation
To build Rimu you need to have [Deno](https://deno.land/) and
[Node.js](https://nodejs.org/) installed.1. Install the Git repository from [Github](https://github.com/srackham/rimu).
git clone https://github.com/srackham/rimu.git
2. Install dependencies:
cd rimu
npm install
deno cache --reload src/deno/rimuc.ts3. Use the [Drake](https://github.com/srackham/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