create-qwik 2.0.0-beta.3 → 2.0.0-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create-qwik.mjs +3 -0
- package/dist/index.mjs +193 -0
- package/dist/starters/apps/base/.prettierignore +1 -1
- package/dist/starters/apps/base/gitignore +1 -0
- package/dist/starters/apps/base/package.json +10 -10
- package/dist/starters/apps/base/src/entry.preview.tsx +1 -3
- package/dist/starters/apps/base/src/entry.ssr.tsx +23 -23
- package/dist/starters/apps/base/tsconfig.json +2 -2
- package/dist/starters/apps/empty/src/root.tsx +20 -17
- package/dist/starters/apps/library/README.md +8 -0
- package/dist/starters/apps/library/package.json +17 -16
- package/dist/starters/apps/library/src/entry.ssr.tsx +24 -14
- package/dist/starters/apps/library/src/global.css +33 -0
- package/dist/starters/apps/library/src/root.tsx +25 -7
- package/dist/starters/apps/library/src/routes/index.tsx +19 -0
- package/dist/starters/apps/library/tsconfig.json +3 -3
- package/dist/starters/apps/library/tsconfig.types.json +15 -0
- package/dist/starters/apps/library/{vite.config.mts → vite.config.ts} +7 -4
- package/dist/starters/apps/playground/src/components/starter/header/header.tsx +1 -4
- package/dist/starters/apps/playground/src/root.tsx +20 -17
- package/dist/starters/apps/playground/src/routes/demo/flower/index.tsx +0 -1
- package/package.json +11 -7
- package/create-qwik.cjs +0 -3
- package/dist/index.cjs +0 -186
- package/dist/starters/apps/base/src/entry.dev.tsx +0 -17
- package/dist/starters/apps/empty/public/manifest.json +0 -9
- package/dist/starters/apps/empty/src/components/router-head/router-head.tsx +0 -32
- package/dist/starters/apps/library/src/entry.dev.tsx +0 -17
- package/dist/starters/apps/playground/src/components/router-head/router-head.tsx +0 -37
- /package/dist/starters/apps/base/{vite.config.mts → vite.config.ts} +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { useDocumentHead, useLocation } from "@qwik.dev/router";
|
|
2
|
-
import { component$ } from "@qwik.dev/core";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The RouterHead component is placed inside of the document `<head>` element.
|
|
6
|
-
*/
|
|
7
|
-
export const RouterHead = component$(() => {
|
|
8
|
-
const head = useDocumentHead();
|
|
9
|
-
const loc = useLocation();
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<>
|
|
13
|
-
<title>{head.title}</title>
|
|
14
|
-
|
|
15
|
-
<link rel="canonical" href={loc.url.href} />
|
|
16
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
17
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
18
|
-
|
|
19
|
-
{head.meta.map((m) => (
|
|
20
|
-
<meta key={m.key} {...m} />
|
|
21
|
-
))}
|
|
22
|
-
|
|
23
|
-
{head.links.map((l) => (
|
|
24
|
-
<link key={l.key} {...l} />
|
|
25
|
-
))}
|
|
26
|
-
|
|
27
|
-
{head.styles.map((s) => (
|
|
28
|
-
<style key={s.key} {...s.props} dangerouslySetInnerHTML={s.style} />
|
|
29
|
-
))}
|
|
30
|
-
</>
|
|
31
|
-
);
|
|
32
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* WHAT IS THIS FILE?
|
|
3
|
-
*
|
|
4
|
-
* Development entry point using only client-side modules:
|
|
5
|
-
* - Do not use this mode in production!
|
|
6
|
-
* - No SSR
|
|
7
|
-
* - No portion of the application is pre-rendered on the server.
|
|
8
|
-
* - All of the application is running eagerly in the browser.
|
|
9
|
-
* - More code is transferred to the browser than in SSR mode.
|
|
10
|
-
* - Optimizer/Serialization/Deserialization code is not exercised!
|
|
11
|
-
*/
|
|
12
|
-
import { render, type RenderOptions } from "@qwik.dev/core";
|
|
13
|
-
import Root from "./root";
|
|
14
|
-
|
|
15
|
-
export default function (opts: RenderOptions) {
|
|
16
|
-
return render(document, <Root />, opts);
|
|
17
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { useDocumentHead, useLocation } from "@qwik.dev/router";
|
|
2
|
-
|
|
3
|
-
import { component$ } from "@qwik.dev/core";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The RouterHead component is placed inside of the document `<head>` element.
|
|
7
|
-
*/
|
|
8
|
-
export const RouterHead = component$(() => {
|
|
9
|
-
const head = useDocumentHead();
|
|
10
|
-
const loc = useLocation();
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<title>{head.title}</title>
|
|
15
|
-
|
|
16
|
-
<link rel="canonical" href={loc.url.href} />
|
|
17
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
18
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
19
|
-
|
|
20
|
-
{head.meta.map((m) => (
|
|
21
|
-
<meta key={m.key} {...m} />
|
|
22
|
-
))}
|
|
23
|
-
|
|
24
|
-
{head.links.map((l) => (
|
|
25
|
-
<link key={l.key} {...l} />
|
|
26
|
-
))}
|
|
27
|
-
|
|
28
|
-
{head.styles.map((s) => (
|
|
29
|
-
<style key={s.key} {...s.props} dangerouslySetInnerHTML={s.style} />
|
|
30
|
-
))}
|
|
31
|
-
|
|
32
|
-
{head.scripts.map((s) => (
|
|
33
|
-
<script key={s.key} {...s.props} dangerouslySetInnerHTML={s.script} />
|
|
34
|
-
))}
|
|
35
|
-
</>
|
|
36
|
-
);
|
|
37
|
-
});
|
|
File without changes
|