Ecosyste.ms: Awesome
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: 2 months 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 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-10T16:51:59.000Z (about 3 years ago)
- Last Synced: 2024-11-16T13:46:29.117Z (3 months ago)
- Topics: deno, preprocessor, typescript
- Language: TypeScript
- Homepage:
- Size: 7.81 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.## **ChangeLog**
`0.1.0` - Server variables:
- Now you can use send variables.`0.0.2` - Bug in await fixed:
- Fixed a bug that did not allow use of await.`0.0.1` - First release:
+ This is the first version!---
## **Examples**
`Example One:`
```ts
// main.ts
import render from "https://deno.land/x/denotag/mod.ts";(async function main() {
const res = await render("./main.html");
console.log(res);
})();
``````html
// This is a standard function that adds something to the html.
Write("Hello world");
```
`Result:`
```html
Hello world
```
---
`Example Two:`
```ts
// main.ts
import render from "https://deno.land/x/denotag/mod.ts";(async function main() {
const res = await render("./main.html", {
hello: "hello world!"
});
console.log(res);
})();
``````html
for (const txt of ["orange", "apple"])
write(txt);
// Get sent variable.
write(data.hello)
```
`Result:`
```html
orange
apple
hello world!```
---
## **Information:**
Deno tag only accepts JS, tested with:
- deno 1.14.3 (release, x86_64-unknown-linux-gnu)- v8 9.4.146.19
- typescript 4.4.2