-
Notifications
You must be signed in to change notification settings - Fork 0
/
stuff.ts
58 lines (53 loc) · 1.7 KB
/
stuff.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { isAbsolute, join, resolve, normalize } from "./deps.ts";
export const DSBUILD_VERSION = "0.2.0";
export const IS_DEV = Deno.env.get("DENO_ENV") === "development";
export const DEFAULT_IN_FILES = [
"src/app.ts",
"src/app.tsx",
"src/index.ts",
"src/index.tsx",
"src/main.ts",
"src/main.tsx",
"src/mod.ts",
"src/mod.tsx",
];
export const DEFAULT_IN_FOLDER = "src";
export const DEFAULT_OUT_FILE = join("public", "app.js");
export const DEFAULT_CSS_FILE = join("public", "app.css");
export const DEFAULT_STATIC_FILE = join("public", "index.html");
export const DEFAULT_SERVE_DIR = "public";
export const REACT_TS_CONFIG = {
compilerOptions: {
target: "es6",
lib: ["dom", "dom.iterable", "esnext", "deno.ns"],
jsx: "react-jsxdev",
jsxImportSource: "react",
},
// "include": ["src"]
};
export const REACT_STATIC_TS_CONFIG = {
compilerOptions: {
lib: ["dom", "dom.iterable", "dom.asynciterable", "esnext", "deno.ns"],
jsx: "react-jsxdev",
jsxImportSource: "react",
},
imports: {
react: "https://esm.sh/v119/[email protected]",
"react-dom/client": "https://esm.sh/v119/[email protected]/client",
"react/": "https://esm.sh/v119/[email protected]/",
"react-dom": "https://esm.sh/v119/[email protected]",
},
};
export const REACT_STATIC_TS_CONFIG_DEV = {
compilerOptions: {
lib: ["dom", "dom.iterable", "dom.asynciterable", "esnext", "deno.ns"],
jsx: "react-jsxdev",
jsxImportSource: "react",
},
imports: {
react: "https://esm.sh/v119/[email protected]?dev",
"react-dom/client": "https://esm.sh/v119/[email protected]/client?dev",
"react/": "https://esm.sh/v119/[email protected]/",
"react-dom": "https://esm.sh/v119/[email protected]?dev",
},
};