Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @ianmcburnie/marko-to-html with all npm packages installed. Try it out:

var markoToHtml = require("@ianmcburnie/marko-to-html")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@ianmcburnie/marko-to-html v0.0.2

Renders marko template output to file


Renders marko template to html file.


<h1>Hello ${}!</h1>
<ul if="notEmpty(data.colors)">
    <li class="color" for="color in data.colors">
<div else>
    No colors!


    "name": "Frank",
    "colors": ["red", "green", "blue"]

From module

var markoToHtml = require('@ianmcburnie/marko-to-html');

markoToHtml('template.marko', 'data.json');

From command line

node index.js 'template.marko' 'data.json'


<h1>Hello Frank!</h1>
    <li class="color">red</li>
    <li class="color">green</li>
    <li class="color">blue</li>
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free