🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

frost-walker

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frost-walker

Simple template engine written for Frost

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
1
-80%
Maintainers
3
Weekly downloads
 
Created
Source

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>

Keywords

frost

FAQs

Package last updated on 22 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts