Skip to content

Commit

Permalink
Upgrade to semver 0.0.9 (#7)
Browse files Browse the repository at this point in the history
* upgrade to semver 0.0.8

* remove special module

* bump `@fartlabs/ht` to semver 0.0.9
  • Loading branch information
EthanThatOneKid authored Nov 6, 2024
1 parent 622ef91 commit 1b444bd
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ deno run --allow-net main.tsx
Resulting `index.html`:

```html
<body><h1>Hello, World!</h1><p>This is a paragraph.</p><a href="https://jsr.io/@fartlabs/htx">@fartlabs/htx</a></body>
<body>
<h1>Hello, World!</h1>
<p>This is a paragraph.</p>
<a href="https://jsr.io/@fartlabs/htx">@fartlabs/htx</a>
</body>
```

## Contribute
Expand Down
12 changes: 7 additions & 5 deletions cli/codegen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Project } from "ts-morph";
import { getDescriptors, toDocs } from "@fartlabs/ht/cli/codegen.ts";
import { getDescriptors, toDocs } from "@fartlabs/ht/cli/codegen";

if (import.meta.main) {
const project = new Project();
Expand Down Expand Up @@ -65,7 +65,6 @@ if (import.meta.main) {
undefined,
{ overwrite: true },
);
modFile.addStatements(`export * from "./special/mod.ts";`);
for (const descriptor of descriptors) {
modFile.addStatements(`export * from "./${descriptor.tag}.tsx";`);
}
Expand All @@ -78,6 +77,8 @@ if (import.meta.main) {
denoConfig.exports = {
".": "./mod.ts",
"./jsx-runtime": "./jsx-runtime.ts",
"./render": "./render.ts",
"./global-attributes": "./global-attributes.ts",
...Object.fromEntries(descriptors.map((descriptor) => [
`./${descriptor.tag}`,
`./${descriptor.tag}.tsx`,
Expand All @@ -86,9 +87,10 @@ if (import.meta.main) {
await Deno.writeTextFile("./deno.json", JSON.stringify(denoConfig, null, 2));

// Run `deno fmt` on the generated files.
const command = new Deno.Command(Deno.execPath(), {
args: ["fmt", "./"],
});
const command = new Deno.Command(
Deno.execPath(),
{ args: ["fmt", "./"] },
);
const output = await command.output();
if (!output.success) {
throw new Error(new TextDecoder().decode(output.stderr));
Expand Down
1 change: 1 addition & 0 deletions css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "@fartlabs/ht/css.ts";
6 changes: 4 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"lock": false,
"name": "@fartlabs/htx",
"version": "0.0.7",
"version": "0.0.9",
"imports": {
"@fartlabs/ht": "jsr:@fartlabs/ht@^0.0.7",
"@fartlabs/ht": "jsr:@fartlabs/ht@^0.0.9",
"@fartlabs/jsonx": "jsr:@fartlabs/jsonx@^0.0.11",
"ts-morph": "npm:ts-morph@^24.0.0"
},
Expand All @@ -18,6 +18,8 @@
"exports": {
".": "./mod.ts",
"./jsx-runtime": "./jsx-runtime.ts",
"./render": "./render.ts",
"./global-attributes": "./global-attributes.ts",
"./a": "./a.tsx",
"./abbr": "./abbr.tsx",
"./acronym": "./acronym.tsx",
Expand Down
1 change: 1 addition & 0 deletions global-attributes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "@fartlabs/ht/lib/global-attributes";
1 change: 0 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./special/mod.ts";
export * from "./a.tsx";
export * from "./abbr.tsx";
export * from "./acronym.tsx";
Expand Down
1 change: 1 addition & 0 deletions render.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "@fartlabs/ht/lib/render";
1 change: 0 additions & 1 deletion special/mod.ts

This file was deleted.

6 changes: 0 additions & 6 deletions special/text_node.ts

This file was deleted.

0 comments on commit 1b444bd

Please sign in to comment.