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.
- Host: GitHub
- URL: https://github.com/flamesx-128/denotag
- Owner: FlamesX-128
- License: mit
- Created: 2021-11-09T23:14:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-21T02:58:16.000Z (over 1 year ago)
- Last Synced: 2025-04-10T18:01:44.632Z (about 1 year ago)
- Topics: deno, preprocessor, typescript
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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
```