-
Notifications
You must be signed in to change notification settings - Fork 0
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
9 changed files
with
212 additions
and
124 deletions.
There are no files selected for viewing
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,30 @@ | ||
name: Deploy | ||
on: [push] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Build site | ||
run: deno run -A ./build.ts | ||
|
||
- name: Upload to Deno Deploy | ||
uses: denoland/deployctl@v1 | ||
with: | ||
project: ultra-deno-kv-oauth-demo | ||
entrypoint: server.js | ||
root: .ultra | ||
import-map: importMap.server.json |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { createBuilder } from "ultra/build.ts"; | ||
|
||
const builder = createBuilder({ | ||
browserEntrypoint: import.meta.resolve("./client.tsx"), | ||
serverEntrypoint: import.meta.resolve("./server.tsx"), | ||
}); | ||
|
||
builder.ignore([ | ||
"./README.md", | ||
"./importMap.json", | ||
"./.git/**", | ||
"./.vscode/**", | ||
"./.github/**", | ||
"./.gitignore", | ||
]); | ||
|
||
// deno-lint-ignore no-unused-vars | ||
const result = await builder.build(); |
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,8 @@ | ||
import hydrate from "ultra/hydrate.js"; | ||
import App from "./src/app.tsx"; | ||
|
||
function ClientApp() { | ||
return <App />; | ||
} | ||
|
||
hydrate(document, <ClientApp />); |
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,13 +1,20 @@ | ||
{ | ||
"tasks": { | ||
"dev": "deno run -A --no-check --unstable --watch ./server.tsx", | ||
"test": "deno test --allow-all", | ||
"build": "deno run -A ./build.ts", | ||
"start": "ULTRA_MODE=production deno run -A --unstable --no-remote ./server.js" | ||
}, | ||
"compilerOptions": { | ||
"jsx": "react-jsxdev", | ||
"jsxImportSource": "react", | ||
"lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"] | ||
}, | ||
"fmt": {}, | ||
"lint": {}, | ||
"importMap": "./importMap.json", | ||
"tasks": { | ||
"start": "deno run -A --no-check --unstable --watch ./main.tsx" | ||
} | ||
"fmt": { | ||
"files": { "exclude": [".ultra"] } | ||
}, | ||
"lint": { | ||
"files": { "exclude": [".ultra"] } | ||
}, | ||
"importMap": "./importMap.json" | ||
} |
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,12 +1,13 @@ | ||
{ | ||
"imports": { | ||
"react": "https://esm.sh/[email protected]", | ||
"react": "https://esm.sh/[email protected]?dev", | ||
"react/": "https://esm.sh/[email protected]/", | ||
"react-dom": "https://esm.sh/[email protected]", | ||
"react-dom/server": "https://esm.sh/[email protected]/server", | ||
"react-dom/server": "https://esm.sh/[email protected]/server?dev", | ||
"react-dom/client": "https://esm.sh/[email protected]/client?dev", | ||
|
||
"kv_oauth": "https://deno.land/x/[email protected]/mod.ts", | ||
"std/": "https://deno.land/[email protected]/", | ||
"ultra/": "https://deno.land/x/[email protected]/" | ||
"ultra/": "https://deno.land/x/[email protected]/", | ||
"std/": "https://deno.land/[email protected]/" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -34,4 +34,4 @@ export default function App( | |
</body> | ||
</html> | ||
); | ||
} | ||
} |