Skip to content

Commit 878b881

Browse files
Merge pull request #462 from thejackshelton/cloudflare-shiki
fix(docs): replaced ssr adapter with static one, removing k11r/nx-clo…
2 parents 4c377e9 + 4bed88f commit 878b881

File tree

8 files changed

+23
-1175
lines changed

8 files changed

+23
-1175
lines changed

apps/website/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,9 @@ The production build will generate client and server modules by running both cli
6363
```shell
6464
pnpm build # or `yarn build`
6565
```
66+
67+
## Static Site Generator (Node.js)
68+
69+
```
70+
pnpm build.server
71+
```

apps/website/adapters/cloudflare-pages/vite.config.ts renamed to apps/website/adapters/static/vite.config.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cloudflarePagesAdapter } from '@builder.io/qwik-city/adapters/cloudflare-pages/vite';
1+
import { staticAdapter } from '@builder.io/qwik-city/adapters/static/vite';
22
import { extendConfig } from '@builder.io/qwik-city/vite';
33
import baseConfig from '../../vite.config';
44

@@ -7,14 +7,12 @@ export default extendConfig(baseConfig, () => {
77
build: {
88
ssr: true,
99
rollupOptions: {
10-
input: ['apps/website/src/entry.cloudflare-pages.tsx', '@qwik-city-plan'],
10+
input: ['@qwik-city-plan'],
1111
},
1212
},
1313
plugins: [
14-
cloudflarePagesAdapter({
15-
// ssg: {
16-
// include: ['/*'],
17-
// }
14+
staticAdapter({
15+
origin: 'https://qwikui.com/',
1816
}),
1917
],
2018
};

apps/website/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99
"@qwik-ui/fluffy": "workspace:*",
1010
"@qwik-ui/material": "workspace:*",
1111
"@qwik-ui/primitives": "workspace:*"
12+
},
13+
"scripts": {
14+
"build.server": "vite build -c adapters/static/vite.config.ts"
1215
}
1316
}

apps/website/project.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,28 +66,6 @@
6666
"command": "node --inspect-brk ../..//node_modules/vite/bin/vite.js --mode ssr --force",
6767
"cwd": "apps/website"
6868
}
69-
},
70-
"deploy": {
71-
"executor": "@k11r/nx-cloudflare-wrangler:deploy-page",
72-
"options": {
73-
"dist": "dist/apps/website/client",
74-
"branch": "main",
75-
"projectName": "qwik-ui"
76-
},
77-
"dependsOn": ["build-cloudflare"]
78-
},
79-
"preview-cloudflare": {
80-
"executor": "@k11r/nx-cloudflare-wrangler:serve-page",
81-
"options": {
82-
"dist": "dist/apps/website/client"
83-
},
84-
"dependsOn": ["build-cloudflare"]
85-
},
86-
"build-cloudflare": {
87-
"executor": "nx:run-commands",
88-
"options": {
89-
"command": "npx nx run website:build:production"
90-
}
9169
}
9270
},
9371
"tags": []

apps/website/src/entry.cloudflare-pages.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/website/src/routes/docs/_components/highlight/highlight.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export const Highlight = component$(
4242
modifiedCode = partsOfCode[0];
4343
}
4444

45-
console.log(highlighter);
4645
codeSig.value = highlighter.codeToHtml(modifiedCode, { lang: language });
4746
});
4847

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"@fontsource-variable/inter": "5.0.8",
3535
"@frsource/cypress-plugin-visual-regression-diff": "^3.3.10",
3636
"@jscutlery/semver": "^3.1.0",
37-
"@k11r/nx-cloudflare-wrangler": "2.7.1",
3837
"@nx/cypress": "16.9.1",
3938
"@nx/eslint-plugin": "16.9.1",
4039
"@nx/js": "16.9.1",

0 commit comments

Comments
 (0)