Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- run: deno task tsc

- name: Publish package
run: npx jsr publish
run: deno publish
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.vscode
/coverage
/docs
/node_modules
/dist
6 changes: 6 additions & 0 deletions .hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/hook.sh"

deno fmt --check
deno lint
deno test --allow-all --doc
12 changes: 8 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sander/html",
"version": "0.1.6",
"version": "0.1.10",
"license": "MIT",
"exports": "./mod.ts",
"tasks": {
Expand All @@ -9,12 +9,16 @@
"doc": "deno doc --html html.ts",
"coverage": "rm -Rf ./coverage && deno test --coverage && deno coverage ./coverage",
"coverage:html": "rm -Rf ./coverage && deno test --coverage && deno coverage ./coverage --html",
"embed:example": "deno run -A embed_example.ts"
"embed:example": "deno run -A embed_example.ts",
"tsc": "deno run -A npm:typescript/tsc --project tsconfig.json && deno fmt dist",
"hook": "deno run --allow-read --allow-run --allow-write https://deno.land/x/deno_hooks@0.1.1/mod.ts"
},
"authors": [
"Sander Hahn <sanderhahn@gmail.com>"
],
"imports": {
"@std/assert": "jsr:@std/assert@^1.0.10"
}
"@std/assert": "jsr:@std/assert@^1.0.10",
"typescript": "npm:typescript@^5.7.3"
},
"nodeModulesDir": "auto"
}
12 changes: 10 additions & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
export { html, type HtmlNode, tag, type ToHtml } from "./html.ts";
export {
comment,
escapeHtml,
html,
type HtmlNode,
raw,
tag,
type ToHtml,
} from "./html.ts";
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@sander/html",
"type": "module",
"main": "./dist/html.js",
"exports": {
".": {
"import": "./dist/html.js",
"require": "./dist/html.js",
"types": "./dist/html.d.ts"
}
}
}
27 changes: 27 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"strict": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"target": "ES2021",
"lib": [
"ES2021",
"ES2016.Array.Include",
"DOM"
],
"module": "ESNext",
"outDir": "./dist",
"allowSyntheticDefaultImports": true
},
"include": [
"**/*.ts"
],
"exclude": [
"node_modules",
"dist",
"mod.ts",
"**/*_test.ts",
"**/*example.ts"
]
}
Loading