@sh4444dow/maniaplanet-style-js-parser
Maniaplanet style parser
Usage no npm install needed!
<script type="module">
import sh4444dowManiaplanetStyleJsParser from 'https://cdn.skypack.dev/@sh4444dow/maniaplanet-style-js-parser';
</script>
Maniaplanet style parser
<script type="module">
import sh4444dowManiaplanetStyleJsParser from 'https://cdn.skypack.dev/@sh4444dow/maniaplanet-style-js-parser';
</script>
lt;, gt;
, $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/
As compiled file are JavaScript, you can use it with any JavaScript interpreter. It's tested with latest node.js.
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.
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>
You can run test by doing: npm test
Licensed under the GNU Lesser General Public License Version 3 (LGPLV3)