0.0.5 • Published 3 years ago

frost-walker v0.0.5

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

frost-walker

A template engine written for frost

Syntax

  • #include "componentPath" :: Path to the component (Alias: #import). Renders markdown if file path ends with .md
  • <frost>JAVASCRIPT</frost> :: Renders JavaScript output
  • <frost embed>JAVASCRIPT</frost> :: Executes JavaScript without rendering the output
  • <!-- TEXT --> :: Comment

Example

With Express

const frost = require("frost-walker");
const app = express();

app.engine("frost", frost.middleware.express());
app.set("view engine", "frost");

Basic Example

index.js

const frost = require("frost-walker");
frost.renderFile("./main.frost", {
    name: "John Doe",
    engine: "Frost Walker",
    languages: [
        "JavaScript",
        "TypeScript",
        "Python",
        "C++"
    ]
});

main.frost

#include "./heading.md"

<h1>Hello World</h1>

heading.md

# Hello World

Hello there, my name is <frost>name</frost> and I made this with <frost>engine</frost> template engine.

I love coding in these languages:
<frost embed>for (const language of languages) {</frost>
- <frost>language</frost>
<frost embed>}</frost>
0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago