# frost-walker

> Simple template engine written for Frost

Latest version **0.0.5** (published 2021-10-22) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install frost-walker
pnpm add frost-walker
yarn add frost-walker
bun add frost-walker
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-10-22 |
| First published | 2021-10-21 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 45.4 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | DevAndromeda |
| Maintainers | zyrouge, snowflake7, adoniswoah |
| Keywords | frost, template, engine |

## Links

- npm: https://www.npmjs.com/package/frost-walker
- Repository: https://github.com/DevSnowflake/frost-walker
- Homepage: https://github.com/DevSnowflake/frost-walker#readme
- Issues: https://github.com/DevSnowflake/frost-walker/issues
- npm.io page: https://npm.io/package/frost-walker

## Dependencies (1)

- [marked](https://npm.io/package/marked.md) ^3.0.7

## Recent versions

- 0.0.5 (latest) — 2021-10-22
- 0.0.4 — 2021-10-22
- 0.0.3 — 2021-10-21
- 0.0.2 — 2021-10-21
- 0.0.1 — 2021-10-21

## README

# 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

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

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

## Basic Example

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

`main.frost`
```html
#include "./heading.md"

<h1>Hello World</h1>
```

`heading.md`
```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>
```

---
_Source: https://npm.io/package/frost-walker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
