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:
Luca Casonato
2021-08-08 11:11:34 +02:00
committed by GitHub
parent 384daf0e06
commit 8e83a032d9
21 changed files with 44 additions and 42 deletions
+1 -1
View File
@@ -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:
+2
View File
@@ -1,3 +1,5 @@
/** @jsx h */
import { h } from "../deps.ts";
interface Props {
+2
View File
@@ -1,3 +1,5 @@
/** @jsx h */
import { h, IS_BROWSER, useData } from "../deps.ts";
export default function Home() {
+2
View File
@@ -1,3 +1,5 @@
/** @jsx h */
import { h, PageProps } from "../../deps.ts";
export default function Home(props: PageProps) {
+2
View File
@@ -1,3 +1,5 @@
/** @jsx h */
import { h, PageConfig } from "../deps.ts";
export default function StaticPage() {
-6
View File
@@ -1,6 +0,0 @@
{
"compilerOptions": {
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment"
}
}