0.1.0 • Published 3 years ago

mker v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

About

mker (pronounced marker) is a native Markdown-like document to HTML compiler for Node.js.

There are differences between Markdown documents and Marker documents. Please check the quick documentation.

This is a pre-release and, as such, may suffer from breaking changes without prior notice.

Getting started

You can install mker just like any other npm package.

npm i mker --save

Note: this packages includes a declaration file for TypeScript.

If a prebuild is already available for your platform, you're good to go. If not, see below compiling the package.

Quick examples

Here's a basic example.

const mker = require('mker');

const result = mker('Hello, *World*!');

result will be a Buffer containing:

<p>Hello, <strong>World</strong>!</p>

Quick Documentation

Marker documents have a structure similar to Markdown documents. The biggest difference is the list of available markers, and how they behave.

Here's a cheatsheet that shows the currently planned markers. Keep in mind that there may be bugs, as the implementation is in its early stages.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Paragraph.

Multiline
paragraph.

Inline markers like *strong*, _emphasis_, =underline=, ~strikethrough~, and even *_=~nested~=_* in any order.

Multiline * markers
can exist, even with spaces around words. *.

- unordered
- lists
  - with sublists
    which work
    - well
  - ## and headings

Inline <html> tags </html>  of <any type *not strong*> *strong* and also
multiline</any>.

Compiling the Package

You'll need to install a C/C++ compiler, as well as CMake.

The package will be compiled when you install it through npm, if a prebuild is not available. Please note that the devDependencies listed in package.json are required for building the package.

If you're missing either a compiler or CMake, an error will be shown. Make sure you have both, and try again.

To manually compile the package, run:

npm run rebuild

...or directly run cmake-js:

npx cmake-js compile

...or globally install cmake-js to be able to run it anywhere:

npm i -g cmake-js

cmake-js compile

Scripts

  • install - installs the package and compiles it if no (pre)build is available
  • rebuild - compiles the package
  • prebuild - generates prebuilds the package (you need to provide your own generator)
  • check - checks if a build or prebuild is available (if not, exits with code 1)

Releases

None.

Contributing

You can contribute by reporting bugs and requesting features on the issue page.

License

mker was created by The Exom Developers. It is licensed under the MIT license.

This project uses first-party and third-party dependencies. They are listed below, along with their licenses.

Dependencies

NPM Packages (dev)

First-Party (C/C++)