generated from deco-sites/start
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from deco-sites/update/to-app
updating starting for apps
- Loading branch information
Showing
35 changed files
with
467 additions
and
689 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 @@ | ||
DECO_SITE_NAME=starting |
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,54 @@ | ||
name: Deploy | ||
|
||
concurrency: | ||
group: environment-${{ github.head_ref || github.ref }} | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
set_vars: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
site_matrix: ${{ steps.set_vars.outputs.site_matrix }} | ||
steps: | ||
- name: Set site matrix | ||
id: set_vars | ||
shell: bash | ||
run: | | ||
if [ -z ${{ vars.SITES }} ]; then | ||
echo "site_matrix={site: [\"${{ github.event.repository.name }}\"] }" >> $GITHUB_OUTPUT | ||
else | ||
echo "site_matrix={site: ${{ vars.SITES }} }" >> $GITHUB_OUTPUT | ||
fi | ||
deploy: | ||
needs: set_vars | ||
strategy: | ||
matrix: ${{ fromJson(needs.set_vars.outputs.site_matrix) }} | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write # Needed for auth with Deno Deploy | ||
contents: read # Needed to clone the repository | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Deco Deploy | ||
id: decoDeployStep | ||
continue-on-error: true | ||
uses: deco-cx/deploy@v0 | ||
with: | ||
site: ${{ matrix.site }} | ||
|
||
- name: Retry Deco Deploy | ||
id: decoDeployRetryStep | ||
if: steps.decoDeployStep.outcome == 'failure' | ||
uses: deco-cx/deploy@v0 | ||
with: | ||
site: ${{ matrix.site }} |
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 |
---|---|---|
|
@@ -51,9 +51,6 @@ typings/ | |
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# dotenv environment variable files | ||
.env* | ||
|
||
.cache/ | ||
|
||
# Mac files | ||
|
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,23 @@ | ||
import { App, AppContext as AC } from "$live/mod.ts"; | ||
import std, { Props } from "apps/compat/std/mod.ts"; | ||
|
||
import manifest, { Manifest } from "../manifest.gen.ts"; | ||
|
||
type StdApp = ReturnType<typeof std>; | ||
export default function Site( | ||
state: Props, | ||
): App<Manifest, Props, [ | ||
StdApp, | ||
]> { | ||
return { | ||
state, | ||
manifest, | ||
dependencies: [ | ||
std(state), | ||
], | ||
}; | ||
} | ||
|
||
export type SiteApp = ReturnType<typeof Site>; | ||
export type AppContext = AC<SiteApp>; | ||
export { onBeforeResolveProps } from "apps/compat/$live/mod.ts"; |
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
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,6 +1,6 @@ | ||
import { marky } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import defaultParsers from "https://deno.land/x/[email protected]/parsers.ts"; | ||
import { LoaderReturnType } from "$live/types.ts"; | ||
import { LoaderReturnType } from "deco/types.ts"; | ||
import { PostBody } from "../utils/Blog.ts"; | ||
|
||
export type Props = { | ||
|
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,20 +1,59 @@ | ||
{ | ||
"imports": { | ||
"deco-sites/starting/": "./", | ||
"deco-sites/std/": "https://denopkg.com/deco-sites/[email protected]/", | ||
"$live/": "https://denopkg.com/deco-cx/[email protected]/", | ||
"$store/": "./", | ||
"deco/": "https://denopkg.com/deco-cx/[email protected]/", | ||
"apps/": "https://denopkg.com/deco-cx/[email protected]/", | ||
"$fresh/": "https://denopkg.com/denoland/fresh@7ad4610e3a42aba42638cbc1041b96ee58a9b29e/", | ||
"preact": "https://esm.sh/[email protected]", | ||
"preact/": "https://esm.sh/[email protected]/", | ||
"preact-render-to-string": "https://esm.sh/*[email protected]", | ||
"@preact/signals": "https://esm.sh/*@preact/[email protected]", | ||
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]", | ||
"std/": "https://deno.land/[email protected]/", | ||
"partytown/": "https://denopkg.com/deco-cx/[email protected]/", | ||
"daisyui": "npm:[email protected]", | ||
"deno-dom": "https://deno.land/x/[email protected]/deno-dom-wasm.ts", | ||
"typography": "npm:@tailwindcss/[email protected]", | ||
"https://deno.land/x/[email protected]/mod.ts": "./overrides/gfm.mod.ts" | ||
}, | ||
"tasks": { | ||
"start": "deno run -A --watch=sections/,functions/,docs/ dev.ts", | ||
"start": "deno task bundle && deno run -A --unstable --watch=tailwind.css,sections/,functions/,loaders/,actions/,workflows/,accounts/,.env dev.ts", | ||
"gen": "deno run -A dev.ts --gen-only", | ||
"component": "deno eval 'import \"$live/scripts/component.ts\"'", | ||
"check": "deno fmt && deno lint && deno check dev.ts main.ts" | ||
"play": "USE_LOCAL_STORAGE_ONLY=true deno task start", | ||
"component": "deno eval 'import \"deco/scripts/component.ts\"'", | ||
"release": "deno eval 'import \"deco/scripts/release.ts\"'", | ||
"update": "deno run -Ar https://deco.cx/update", | ||
"check": "deno fmt && deno lint && deno check dev.ts main.ts", | ||
"install": "deno eval 'import \"deco/scripts/apps/install.ts\"'", | ||
"uninstall": "deno eval 'import \"deco/scripts/apps/uninstall.ts\"'", | ||
"bundle": "deno eval 'import \"deco/scripts/apps/bundle.ts\"' deco-sites/starting", | ||
"cache_clean": "rm deno.lock; deno cache -r main.ts", | ||
"build": "deno run -A dev.ts build", | ||
"preview": "deno run -A main.ts" | ||
}, | ||
"githooks": { | ||
"pre-commit": "check" | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"static/", | ||
"docs/**/*.md" | ||
"README.md", | ||
"_fresh" | ||
], | ||
"importMap": "./import_map.json", | ||
"lint": { | ||
"rules": { | ||
"tags": [ | ||
"fresh", | ||
"recommended" | ||
] | ||
} | ||
}, | ||
"nodeModulesDir": true, | ||
"compilerOptions": { | ||
"jsx": "react-jsx", | ||
"jsxImportSource": "preact" | ||
} | ||
} | ||
} |
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,12 @@ | ||
#!/usr/bin/env -S deno run -A --watch=static/ | ||
import dev from "$live/dev.ts"; | ||
import liveManifest from "$live/live.gen.ts"; | ||
import liveStdManifest from "deco-sites/std/live.gen.ts"; | ||
#!/usr/bin/env -S deno run -A --watch | ||
import "https://deno.land/x/[email protected]/load.ts"; | ||
|
||
await dev(import.meta.url, "./main.ts", { | ||
injectRoutes: false, | ||
imports: { | ||
"$live": liveManifest, | ||
"deco-sites/std": liveStdManifest, | ||
}, | ||
}); | ||
import dev from "$fresh/dev.ts"; | ||
import config from "./fresh.config.ts"; | ||
|
||
// Generate manifest and boot server | ||
await dev(import.meta.url, "./main.ts", config); | ||
|
||
if (Deno.args.includes("build")) { | ||
Deno.exit(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,13 @@ | ||
import { defineConfig } from "$fresh/server.ts"; | ||
import plugins from "https://denopkg.com/deco-sites/[email protected]/plugins/mod.ts"; | ||
import partytownPlugin from "partytown/mod.ts"; | ||
import decoManifest from "./manifest.gen.ts"; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
...plugins({ | ||
manifest: decoManifest, | ||
}), | ||
partytownPlugin(), | ||
], | ||
}); |
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,74 @@ | ||
// DO NOT EDIT. This file is generated by Fresh. | ||
// This file SHOULD be checked into source version control. | ||
// This file is automatically updated during development when running `dev.ts`. | ||
|
||
import * as $0 from "./routes/_app.tsx"; | ||
import * as $1 from "./routes/admin/[...catchall].tsx"; | ||
import * as $2 from "./routes/api/calc.tsx"; | ||
import * as $3 from "./routes/api/case.tsx"; | ||
import * as $4 from "./routes/api/leads.tsx"; | ||
import * as $5 from "./routes/api/ranking.ts"; | ||
import * as $6 from "./routes/api/webinar.tsx"; | ||
import * as $7 from "./routes/gfm.css.ts"; | ||
import * as $8 from "./routes/hackathon4.ts"; | ||
import * as $9 from "./routes/index.tsx"; | ||
import * as $10 from "./routes/proxy/image/index.tsx"; | ||
import * as $$0 from "./islands/CampHeader.tsx"; | ||
import * as $$1 from "./islands/CampMentor.tsx"; | ||
import * as $$2 from "./islands/Case.tsx"; | ||
import * as $$3 from "./islands/ChangeDevice.tsx"; | ||
import * as $$4 from "./islands/ChangeTheme.tsx"; | ||
import * as $$5 from "./islands/Cms.tsx"; | ||
import * as $$6 from "./islands/ContactUs.tsx"; | ||
import * as $$7 from "./islands/FaviconImage.tsx"; | ||
import * as $$8 from "./islands/ForwardBackButtons/ForwardBackButtons.tsx"; | ||
import * as $$9 from "./islands/Header.tsx"; | ||
import * as $$10 from "./islands/HelpFaq.tsx"; | ||
import * as $$11 from "./islands/ImpactCalculator.tsx"; | ||
import * as $$12 from "./islands/LiveProjects.tsx"; | ||
import * as $$13 from "./islands/OnThisPage.tsx"; | ||
import * as $$14 from "./islands/PopularDocuments.tsx"; | ||
import * as $$15 from "./islands/RankingAnalyze.tsx"; | ||
import * as $$16 from "./islands/RankingHeader.tsx"; | ||
import * as $$17 from "./islands/Sidebar.tsx"; | ||
import * as $$18 from "./islands/SliderJS.tsx"; | ||
|
||
const manifest = { | ||
routes: { | ||
"./routes/_app.tsx": $0, | ||
"./routes/admin/[...catchall].tsx": $1, | ||
"./routes/api/calc.tsx": $2, | ||
"./routes/api/case.tsx": $3, | ||
"./routes/api/leads.tsx": $4, | ||
"./routes/api/ranking.ts": $5, | ||
"./routes/api/webinar.tsx": $6, | ||
"./routes/gfm.css.ts": $7, | ||
"./routes/hackathon4.ts": $8, | ||
"./routes/index.tsx": $9, | ||
"./routes/proxy/image/index.tsx": $10, | ||
}, | ||
islands: { | ||
"./islands/CampHeader.tsx": $$0, | ||
"./islands/CampMentor.tsx": $$1, | ||
"./islands/Case.tsx": $$2, | ||
"./islands/ChangeDevice.tsx": $$3, | ||
"./islands/ChangeTheme.tsx": $$4, | ||
"./islands/Cms.tsx": $$5, | ||
"./islands/ContactUs.tsx": $$6, | ||
"./islands/FaviconImage.tsx": $$7, | ||
"./islands/ForwardBackButtons/ForwardBackButtons.tsx": $$8, | ||
"./islands/Header.tsx": $$9, | ||
"./islands/HelpFaq.tsx": $$10, | ||
"./islands/ImpactCalculator.tsx": $$11, | ||
"./islands/LiveProjects.tsx": $$12, | ||
"./islands/OnThisPage.tsx": $$13, | ||
"./islands/PopularDocuments.tsx": $$14, | ||
"./islands/RankingAnalyze.tsx": $$15, | ||
"./islands/RankingHeader.tsx": $$16, | ||
"./islands/Sidebar.tsx": $$17, | ||
"./islands/SliderJS.tsx": $$18, | ||
}, | ||
baseUrl: import.meta.url, | ||
}; | ||
|
||
export default manifest; |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.