An open API service indexing awesome lists of open source software.

https://github.com/flamesx-128/denotag

A simple html preprocessor for deno.
https://github.com/flamesx-128/denotag

deno preprocessor typescript

Last synced: about 1 year ago
JSON representation

A simple html preprocessor for deno.

Awesome Lists containing this project

README

          

# Deno Tag

A simple HTML preprocessor for Deno.

## Example

```ts, deno@2.2.0
import { render } from "https://deno.land/x/denotag@0.2.0/mod.ts";

const html = Deno.readTextFileSync(
new URL("assets/main.html", import.meta.url)
);

console.log(
await render(html, {
params: {
timestamp: Date.now()
}
})
)
```

```html


The value of the fibonacci sequence is:

function fibonacci(n: number): number {
if (n <= 1) {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
}

return fibonacci(20);


return Date.now() - params.timestamp;

```

```html


The value of the fibonacci sequence is:
6765

13

```