feat: --config is not needed anymore (#48)
This commit removes the need for users to specify a --config file. TS libs are now configured via `/// <reference>` directives, and the JSX transform is specified via the `/** @jsx h */` pragma. The future is configless!
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
Start the project:
|
||||
|
||||
```
|
||||
deno run -A --unstable --config tsconfig.json --watch main.ts
|
||||
deno run -A --unstable --watch main.ts
|
||||
```
|
||||
|
||||
After adding, removing, or moving a page in the `pages` directory, run:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, tw } from "../deps.ts";
|
||||
|
||||
export function RoundedButton(props: h.JSX.HTMLAttributes<HTMLButtonElement>) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, tw } from "../deps.ts";
|
||||
|
||||
export function IconMinus() {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="dom" />
|
||||
/// <reference lib="deno.ns" />
|
||||
/// <reference lib="deno.unstable" />
|
||||
|
||||
export * from "../runtime.ts";
|
||||
import { IS_BROWSER } from "../runtime.ts";
|
||||
import { setup, tw } from "https://esm.sh/twind";
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "../deps.ts";
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { RoundedButton } from "../components/Button.tsx";
|
||||
import { IconMinus, IconPlus } from "../components/Icons.tsx";
|
||||
import { h, IS_BROWSER, tw, useState } from "../deps.ts";
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageConfig, PageProps, useData } from "../../deps.ts";
|
||||
|
||||
export default function ModuleInfoPage({ params }: PageProps) {
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "deno.ns", "deno.unstable"],
|
||||
"jsxFactory": "h",
|
||||
"jsxFragmentFactory": "Fragment"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user