create-qwik 2.0.0-beta.6 → 2.0.0-beta.8
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/dist/index.cjs +91 -91
- package/dist/starters/apps/base/package.json +9 -9
- package/dist/starters/apps/base/src/entry.ssr.tsx +22 -18
- package/dist/starters/apps/empty/src/root.tsx +20 -17
- package/dist/starters/apps/library/package.json +8 -8
- package/dist/starters/apps/playground/src/root.tsx +20 -17
- package/package.json +2 -2
- 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/playground/src/components/router-head/router-head.tsx +0 -37
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
"qwik": "qwik"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@qwik.dev/core": "^2.0.0-beta.
|
|
20
|
-
"@qwik.dev/router": "^2.0.0-beta.
|
|
19
|
+
"@qwik.dev/core": "^2.0.0-beta.8",
|
|
20
|
+
"@qwik.dev/router": "^2.0.0-beta.8",
|
|
21
21
|
"@eslint/js": "latest",
|
|
22
|
-
"@types/node": "24.
|
|
23
|
-
"typescript-eslint": "8.
|
|
24
|
-
"eslint": "9.
|
|
25
|
-
"eslint-plugin-qwik": "^2.0.0-beta.
|
|
26
|
-
"globals": "16.
|
|
27
|
-
"prettier": "3.
|
|
22
|
+
"@types/node": "24.2.1",
|
|
23
|
+
"typescript-eslint": "8.39.1",
|
|
24
|
+
"eslint": "9.33.0",
|
|
25
|
+
"eslint-plugin-qwik": "^2.0.0-beta.8",
|
|
26
|
+
"globals": "16.3.0",
|
|
27
|
+
"prettier": "3.6.2",
|
|
28
28
|
"typescript": "5.8.3",
|
|
29
29
|
"typescript-plugin-css-modules": "latest",
|
|
30
|
-
"vite": "7.
|
|
30
|
+
"vite": "7.1.0",
|
|
31
31
|
"vite-tsconfig-paths": "^4.2.1"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WHAT IS THIS FILE?
|
|
3
3
|
*
|
|
4
|
-
* SSR renderer function, used
|
|
4
|
+
* SSR renderer function, used by Qwik Router.
|
|
5
5
|
*
|
|
6
|
-
* Note that
|
|
6
|
+
* Note that this is the only place the Qwik renderer is called.
|
|
7
7
|
* On the client, containers resume and do not call render.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
renderToStream,
|
|
11
|
-
type RenderToStreamOptions,
|
|
12
|
-
} from "@qwik.dev/core/server";
|
|
9
|
+
import { createRenderer } from "@qwik.dev/router";
|
|
13
10
|
import Root from "./root";
|
|
14
11
|
|
|
15
|
-
export default
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
export default createRenderer((opts) => {
|
|
13
|
+
return {
|
|
14
|
+
jsx: <Root />,
|
|
15
|
+
options: {
|
|
16
|
+
...opts,
|
|
17
|
+
// Use container attributes to set attributes on the html tag.
|
|
18
|
+
containerAttributes: {
|
|
19
|
+
lang: "en-us",
|
|
20
|
+
...opts.containerAttributes,
|
|
21
|
+
},
|
|
22
|
+
serverData: {
|
|
23
|
+
...opts.serverData,
|
|
24
|
+
// These are the default values for the document head and are overridden by the `head` exports
|
|
25
|
+
// documentHead: {
|
|
26
|
+
// title: "My App",
|
|
27
|
+
// },
|
|
28
|
+
},
|
|
22
29
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
}
|
|
30
|
+
};
|
|
31
|
+
});
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { component
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { component$ } from "@qwik.dev/core";
|
|
2
|
+
import {
|
|
3
|
+
DocumentHeadTags,
|
|
4
|
+
RouterOutlet,
|
|
5
|
+
useLocation,
|
|
6
|
+
useQwikRouter,
|
|
7
|
+
} from "@qwik.dev/router";
|
|
4
8
|
|
|
5
9
|
import "./global.css";
|
|
6
10
|
|
|
7
11
|
export default component$(() => {
|
|
12
|
+
useQwikRouter();
|
|
13
|
+
const { url } = useLocation();
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
10
|
-
* immediately followed by the document's <head> and <body>.
|
|
11
|
-
*
|
|
12
|
-
* Don't remove the `<head>` and `<body>` elements.
|
|
16
|
+
* This is the root of a QwikRouter site. It contains the document's `<head>` and `<body>`. You can adjust them as you see fit.
|
|
13
17
|
*/
|
|
14
18
|
|
|
15
19
|
return (
|
|
16
|
-
|
|
20
|
+
<>
|
|
17
21
|
<head>
|
|
18
22
|
<meta charset="utf-8" />
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<RouterHead />
|
|
23
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
24
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
25
|
+
|
|
26
|
+
<DocumentHeadTags />
|
|
27
|
+
|
|
28
|
+
<link rel="canonical" href={url.href} />
|
|
26
29
|
</head>
|
|
27
|
-
<body
|
|
30
|
+
<body>
|
|
28
31
|
<RouterOutlet />
|
|
29
32
|
</body>
|
|
30
|
-
|
|
33
|
+
</>
|
|
31
34
|
);
|
|
32
35
|
});
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"release": "np"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@qwik.dev/core": "2.0.0-beta.
|
|
36
|
+
"@qwik.dev/core": "2.0.0-beta.8",
|
|
37
37
|
"@eslint/js": "latest",
|
|
38
|
-
"@types/node": "24.
|
|
39
|
-
"typescript-eslint": "8.
|
|
40
|
-
"eslint": "9.
|
|
41
|
-
"eslint-plugin-qwik": "2.0.0-beta.
|
|
42
|
-
"globals": "16.
|
|
38
|
+
"@types/node": "24.2.1",
|
|
39
|
+
"typescript-eslint": "8.39.1",
|
|
40
|
+
"eslint": "9.33.0",
|
|
41
|
+
"eslint-plugin-qwik": "2.0.0-beta.8",
|
|
42
|
+
"globals": "16.3.0",
|
|
43
43
|
"np": "^8.0.4",
|
|
44
|
-
"prettier": "3.
|
|
44
|
+
"prettier": "3.6.2",
|
|
45
45
|
"typescript": "5.8.3",
|
|
46
|
-
"vite": "7.
|
|
46
|
+
"vite": "7.1.0",
|
|
47
47
|
"vite-tsconfig-paths": "^4.2.1"
|
|
48
48
|
},
|
|
49
49
|
"__qwik__": {
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { component
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { component$ } from "@qwik.dev/core";
|
|
2
|
+
import {
|
|
3
|
+
DocumentHeadTags,
|
|
4
|
+
RouterOutlet,
|
|
5
|
+
useLocation,
|
|
6
|
+
useQwikRouter,
|
|
7
|
+
} from "@qwik.dev/router";
|
|
4
8
|
|
|
5
9
|
import "./global.css";
|
|
6
10
|
|
|
7
11
|
export default component$(() => {
|
|
12
|
+
useQwikRouter();
|
|
13
|
+
const { url } = useLocation();
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
10
|
-
* immediately followed by the document's <head> and <body>.
|
|
11
|
-
*
|
|
12
|
-
* Don't remove the `<head>` and `<body>` elements.
|
|
16
|
+
* This is the root of a QwikRouter site. It contains the document's `<head>` and `<body>`. You can adjust them as you see fit.
|
|
13
17
|
*/
|
|
14
18
|
|
|
15
19
|
return (
|
|
16
|
-
|
|
20
|
+
<>
|
|
17
21
|
<head>
|
|
18
22
|
<meta charset="utf-8" />
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<RouterHead />
|
|
23
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
24
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
25
|
+
|
|
26
|
+
<DocumentHeadTags />
|
|
27
|
+
|
|
28
|
+
<link rel="canonical" href={url.href} />
|
|
26
29
|
</head>
|
|
27
|
-
<body
|
|
30
|
+
<body>
|
|
28
31
|
<RouterOutlet />
|
|
29
32
|
</body>
|
|
30
|
-
|
|
33
|
+
</>
|
|
31
34
|
);
|
|
32
35
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-qwik",
|
|
3
3
|
"description": "Interactive CLI for create Qwik projects and adding features.",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.8",
|
|
5
5
|
"author": "Qwik Team",
|
|
6
6
|
"bin": "./create-qwik.cjs",
|
|
7
7
|
"bugs": "https://github.com/QwikDev/qwik/issues",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@clack/prompts": "0.7.0",
|
|
10
|
-
"@types/yargs": "17.0.
|
|
10
|
+
"@types/yargs": "17.0.33",
|
|
11
11
|
"kleur": "4.1.5",
|
|
12
12
|
"yargs": "17.7.2"
|
|
13
13
|
},
|
|
@@ -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,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
|
-
});
|