@sh4444dow/maniaplanet-style-js-parser

1.0.0 • Public • Published

Build Status

ManiaPlanet Style parser

JavaScript port of ManiaLib's PHP style parser.

It supports : $i, $o, $s, $w, $m, $g, $n, $<, $>, $l (for links like $l[http://maniaplanet.org]maniaplanet$l) and colors ($f20 for instance).

Live demo : https://maniaplanet.github.io/maniaplanet-style-js-parser/

Build

Requirements

As compiled file are JavaScript, you can use it with any JavaScript interpreter. It's tested with latest node.js.

Installation

A CakeFile is used in order to generate all required files.

Just type npm run build and the file bin/mp-style-parser.js will be generated to be used in browsers.

Usage

In your javascript application just do MPStyle.Parser.toHTML('$o foo $i bar');

In web projects : <script src="https://maniaplanet.github.io/maniaplanet-style-js-parser/bin/mp-style-parser.js"></script>

Tests

You can run test by doing: npm test

License

Licensed under the GNU Lesser General Public License Version 3 (LGPLV3)

Package Sidebar

Install

npm i @sh4444dow/maniaplanet-style-js-parser

Weekly Downloads

2

Version

1.0.0

License

LGPL-3.0

Unpacked Size

46.6 kB

Total Files

22

Last publish

Collaborators

  • sh4444dow