create-qwik 0.0.29 → 0.0.32
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/package.json +1 -1
- package/starters/apps/base/.eslintrc.js +1 -0
- package/starters/apps/base/package.json +2 -2
- package/starters/apps/library/src/entry.ssr.tsx +2 -2
- package/starters/apps/qwik-city/package.json +1 -1
- package/starters/apps/qwik-city/src/components/sidebar/sidebar.tsx +5 -2
- package/starters/apps/qwik-city/src/entry.ssr.tsx +2 -2
- package/starters/apps/starter/src/entry.ssr.tsx +2 -2
- package/starters/apps/starter-partytown/src/entry.ssr.tsx +2 -2
- package/starters/apps/todo/src/entry.ssr.tsx +2 -2
- package/starters/apps/starter-builder/package.json +0 -10
- package/starters/apps/starter-builder/src/components/app/app.tsx +0 -13
- package/starters/apps/starter-builder/src/components/footer/footer.tsx +0 -15
- package/starters/apps/starter-builder/src/components/header/header.tsx +0 -15
- package/starters/apps/starter-builder/src/entry.dev.tsx +0 -13
- package/starters/apps/starter-builder/src/entry.ssr.tsx +0 -15
- package/starters/apps/starter-builder/src/global.css +0 -3
- package/starters/apps/starter-builder/src/root.tsx +0 -29
package/package.json
CHANGED
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"typecheck": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@builder.io/qwik": "0.0.
|
|
17
|
+
"@builder.io/qwik": "0.0.32",
|
|
18
18
|
"@types/eslint": "8.4.2",
|
|
19
19
|
"@types/node": "latest",
|
|
20
20
|
"@typescript-eslint/eslint-plugin": "5.27.0",
|
|
21
21
|
"@typescript-eslint/parser": "5.27.0",
|
|
22
|
-
"eslint-plugin-qwik": "0.0.
|
|
22
|
+
"eslint-plugin-qwik": "0.0.32",
|
|
23
23
|
"eslint": "8.16.0",
|
|
24
24
|
"node-fetch": "2.6.7",
|
|
25
25
|
"typescript": "4.7.2",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { renderToString,
|
|
1
|
+
import { renderToString, RenderOptions } from '@builder.io/qwik/server';
|
|
2
2
|
import { manifest } from '@qwik-client-manifest';
|
|
3
3
|
import { Root } from './root';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Server-Side Render method to be called by a server.
|
|
7
7
|
*/
|
|
8
|
-
export function render(opts?:
|
|
8
|
+
export function render(opts?: RenderOptions) {
|
|
9
9
|
// Render the Root component to a string
|
|
10
10
|
// Pass in the manifest that was generated from the client build
|
|
11
11
|
return renderToString(<Root />, {
|
|
@@ -14,9 +14,12 @@ export const SideBar = component$(
|
|
|
14
14
|
return (
|
|
15
15
|
<Host class="sidebar">
|
|
16
16
|
<nav class="breadcrumbs">
|
|
17
|
-
<ol>
|
|
17
|
+
<ol itemScope itemType="https://schema.org/BreadcrumbList">
|
|
18
18
|
{page.breadcrumbs.map((b) => (
|
|
19
|
-
<li>
|
|
19
|
+
<li>
|
|
20
|
+
{b.text}
|
|
21
|
+
<meta itemProp="position" content="0"></meta>
|
|
22
|
+
</li>
|
|
20
23
|
))}
|
|
21
24
|
</ol>
|
|
22
25
|
</nav>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { renderToString,
|
|
1
|
+
import { renderToString, RenderOptions } from '@builder.io/qwik/server';
|
|
2
2
|
import { manifest } from '@qwik-client-manifest';
|
|
3
3
|
import { Root } from './root';
|
|
4
4
|
|
|
5
|
-
export function render(opts:
|
|
5
|
+
export function render(opts: RenderOptions) {
|
|
6
6
|
return renderToString(<Root />, {
|
|
7
7
|
manifest,
|
|
8
8
|
...opts,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { renderToString,
|
|
1
|
+
import { renderToString, RenderOptions } from '@builder.io/qwik/server';
|
|
2
2
|
import { manifest } from '@qwik-client-manifest';
|
|
3
3
|
import { Root } from './root';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Server-Side Render method to be called by a server.
|
|
7
7
|
*/
|
|
8
|
-
export function render(opts?:
|
|
8
|
+
export function render(opts?: RenderOptions) {
|
|
9
9
|
// Render the Root component to a string
|
|
10
10
|
// Pass in the manifest that was generated from the client build
|
|
11
11
|
return renderToString(<Root />, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { renderToString,
|
|
1
|
+
import { renderToString, RenderOptions } from '@builder.io/qwik/server';
|
|
2
2
|
import { manifest } from '@qwik-client-manifest';
|
|
3
3
|
import { Root } from './root';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Qwik server-side render function.
|
|
7
7
|
*/
|
|
8
|
-
export function render(opts:
|
|
8
|
+
export function render(opts: RenderOptions) {
|
|
9
9
|
return renderToString(<Root />, {
|
|
10
10
|
manifest,
|
|
11
11
|
qwikLoader: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { renderToString,
|
|
1
|
+
import { renderToString, RenderOptions } from '@builder.io/qwik/server';
|
|
2
2
|
import { manifest } from '@qwik-client-manifest';
|
|
3
3
|
import { Root } from './root';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Server-Side Render method to be called by a server.
|
|
7
7
|
*/
|
|
8
|
-
export function render(opts?:
|
|
8
|
+
export function render(opts?: RenderOptions) {
|
|
9
9
|
// Render the Root component to a string
|
|
10
10
|
// Pass in the manifest that was generated from the client build
|
|
11
11
|
return renderToString(<Root />, {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { component$ } from '@builder.io/qwik';
|
|
2
|
-
import { Footer } from '../footer/footer';
|
|
3
|
-
import { Header } from '../header/header';
|
|
4
|
-
|
|
5
|
-
export const App = component$(() => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<Header />
|
|
9
|
-
<div id="builder-content"></div>
|
|
10
|
-
<Footer />
|
|
11
|
-
</>
|
|
12
|
-
);
|
|
13
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { component$ } from '@builder.io/qwik';
|
|
2
|
-
|
|
3
|
-
export const Footer = component$(() => {
|
|
4
|
-
return (
|
|
5
|
-
<>
|
|
6
|
-
<hr />
|
|
7
|
-
<p style={{ 'text-align': 'center' }}>
|
|
8
|
-
Made with ❤️ by{' '}
|
|
9
|
-
<a target="_blank" href="https://www.builder.io/">
|
|
10
|
-
Builder.io
|
|
11
|
-
</a>
|
|
12
|
-
</p>
|
|
13
|
-
</>
|
|
14
|
-
);
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { component$ } from '@builder.io/qwik';
|
|
2
|
-
|
|
3
|
-
export const Header = component$(() => {
|
|
4
|
-
return (
|
|
5
|
-
<p style={{ 'text-align': 'center' }}>
|
|
6
|
-
<a href="https://github.com/builderio/qwik">
|
|
7
|
-
<img
|
|
8
|
-
alt="Qwik Logo"
|
|
9
|
-
width={400}
|
|
10
|
-
src="https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F667ab6c2283d4c4d878fb9083aacc10f"
|
|
11
|
-
/>
|
|
12
|
-
</a>
|
|
13
|
-
</p>
|
|
14
|
-
);
|
|
15
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { render } from '@builder.io/qwik';
|
|
2
|
-
import { Root } from './root';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Development entry point using only client-side modules:
|
|
6
|
-
* - Do not use this mode in production!
|
|
7
|
-
* - No SSR
|
|
8
|
-
* - No portion of the application is pre-rendered on the server.
|
|
9
|
-
* - All of the application is running eagerly in the browser.
|
|
10
|
-
* - More code is transferred to the browser than in SSR mode.
|
|
11
|
-
* - Optimizer/Serialization/Deserialization code is not exercised!
|
|
12
|
-
*/
|
|
13
|
-
render(document, <Root />);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { renderToString, RenderToStringOptions } from '@builder.io/qwik/server';
|
|
2
|
-
import { manifest } from '@qwik-client-manifest';
|
|
3
|
-
import { Root } from './root';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Server-Side Render method to be called by a server.
|
|
7
|
-
*/
|
|
8
|
-
export function render(opts?: RenderToStringOptions) {
|
|
9
|
-
// Render the Root component to a string
|
|
10
|
-
// Pass in the manifest that was generated from the client build
|
|
11
|
-
return renderToString(<Root />, {
|
|
12
|
-
manifest,
|
|
13
|
-
...opts,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { App } from './components/app/app';
|
|
2
|
-
|
|
3
|
-
import './global.css';
|
|
4
|
-
|
|
5
|
-
export const Root = () => {
|
|
6
|
-
return (
|
|
7
|
-
<html>
|
|
8
|
-
<head>
|
|
9
|
-
<meta charSet="utf-8" />
|
|
10
|
-
<title>Qwik Builder App</title>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<App />
|
|
14
|
-
<script>({fetchQwikBuilderContent.toString()})();</script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const fetchQwikBuilderContent = async () => {
|
|
21
|
-
const qwikUrl = new URL('https://qa.builder.io/api/v1/qwik/page');
|
|
22
|
-
// Demo API key for demonstration only. Please replace with your key
|
|
23
|
-
qwikUrl.searchParams.set('apiKey', '5b8073f890b043be81574f96cfd1250b');
|
|
24
|
-
qwikUrl.searchParams.set('userAttributes.urlPath', location.pathname);
|
|
25
|
-
|
|
26
|
-
const response = await fetch(String(qwikUrl));
|
|
27
|
-
const { html } = await response.json();
|
|
28
|
-
document.querySelector('#builder-content')!.innerHTML = html;
|
|
29
|
-
};
|