generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
2,108 additions
and
1,133 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ node_modules | |
.yarn | ||
.pnp.cjs | ||
.pnp.loader.mjs | ||
static/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v20.3.0 | ||
v20.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import esbuild from "esbuild"; | ||
const typescriptEntries = ["static/main.ts"]; | ||
// const cssEntries = ["static/style.css"]; | ||
const entries = [ | ||
...typescriptEntries, | ||
// ...cssEntries | ||
]; | ||
|
||
export const esBuildContext: esbuild.BuildOptions = { | ||
sourcemap: true, | ||
entryPoints: entries, | ||
bundle: true, | ||
minify: false, | ||
loader: { | ||
".png": "dataurl", | ||
".woff": "dataurl", | ||
".woff2": "dataurl", | ||
".eot": "dataurl", | ||
".ttf": "dataurl", | ||
".svg": "dataurl", | ||
}, | ||
outdir: "static/dist", | ||
}; | ||
|
||
esbuild | ||
.build(esBuildContext) | ||
.then(() => { | ||
console.log("\tesbuild complete"); | ||
}) | ||
.catch((err) => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import esbuild from "esbuild"; | ||
import { esBuildContext } from "./esbuild-build"; | ||
|
||
(async () => { | ||
await server(); | ||
})().catch((error) => { | ||
console.error("Unhandled error:", error); | ||
process.exit(1); | ||
}); | ||
|
||
export async function server() { | ||
const _context = await esbuild.context(esBuildContext); | ||
const { port } = await _context.serve({ | ||
servedir: "static", | ||
port: 8080, | ||
}); | ||
console.log(`http://localhost:${port}`); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<title>Hello, world!</title> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Ubiquity TypeScript Template</title> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<h1>Hello, world!</h1> | ||
<h1>Ubiquity TypeScript Template</h1> | ||
<script type="module" src="dist/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export async function mainModule() { | ||
console.log(`Hello from mainModule`); | ||
} | ||
mainModule() | ||
.then(() => { | ||
console.log("mainModule loaded"); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
body{ | ||
font-family: "Proxima Nova", "Ubiquity Nova", sans-serif; | ||
background-color: #06061aff; | ||
color: #fff; | ||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABYWlDQ1BrQ0dDb2xvclNwYWNlRGlzcGxheVAzAAAokWNgYFJJLCjIYWFgYMjNKykKcndSiIiMUmB/yMAOhLwMYgwKicnFBY4BAT5AJQwwGhV8u8bACKIv64LMOiU1tUm1XsDXYqbw1YuvRJsw1aMArpTU4mQg/QeIU5MLikoYGBhTgGzl8pICELsDyBYpAjoKyJ4DYqdD2BtA7CQI+whYTUiQM5B9A8hWSM5IBJrB+API1klCEk9HYkPtBQFul8zigpzESoUAYwKuJQOUpFaUgGjn/ILKosz0jBIFR2AopSp45iXr6SgYGRiaMzCAwhyi+nMgOCwZxc4gxJrvMzDY7v////9uhJjXfgaGjUCdXDsRYhoWDAyC3AwMJ3YWJBYlgoWYgZgpLY2B4dNyBgbeSAYG4QtAPdHFacZGYHlGHicGBtZ7//9/VmNgYJ/MwPB3wv//vxf9//93MVDzHQaGA3kAFSFl7jXH0fsAAAA4ZVhJZk1NACoAAAAIAAGHaQAEAAAAAQAAABoAAAAAAAKgAgAEAAAAAQAAABigAwAEAAAAAQAAABgAAAAAwf1XlwAAACNJREFUSA3t0IEAAAAMBKFHm7/UTaQQWnXDgAEDBgwYMGDgAXaJAz4RVVHYAAAAAElFTkSuQmCC"); | ||
} | ||
@font-face { | ||
font-family: "Ubiquity Nova"; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(./fonts/ubiquity-nova-standard.eot); | ||
src: url(./fonts/ubiquity-nova-standard.eot#iefix) format("embedded-opentype"), url(./fonts/ubiquity-nova-standard.woff) format("woff"), | ||
url(./fonts/ubiquity-nova-standard.ttf) format("truetype"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.