create-qwik 0.0.21 → 0.0.24
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/package.json +3 -3
- package/starters/apps/qwik-city/package.json +1 -1
- package/starters/apps/qwik-city/{pages → src/pages}/INDEX +0 -0
- package/starters/apps/qwik-city/{pages → src/pages}/blog/progressive.mdx +0 -0
- package/starters/apps/qwik-city/{pages → src/pages}/blog/reactivity.mdx +0 -0
- package/starters/apps/qwik-city/{pages → src/pages}/blog/resumable.mdx +0 -0
- package/starters/apps/qwik-city/{pages → src/pages}/index.mdx +3 -5
- package/starters/apps/qwik-city/vite.config.ts +1 -3
- package/starters/apps/starter-partytown/package.json +1 -1
- package/starters/apps/todo/src/components/app/app.tsx +4 -3
- package/starters/apps/todo/src/components/body/body.tsx +1 -1
- package/starters/apps/todo/src/components/header/header.tsx +1 -0
- package/starters/apps/todo/src/state/state.ts +2 -0
- package/starters/features/eslint/package.json +3 -3
- package/starters/features/tailwindcss/package.json +1 -1
- package/starters/servers/cloudflare-pages/package.json +0 -1
- package/starters/servers/cloudflare-pages/src/entry.cloudflare.tsx +1 -1
- package/starters/servers/cloudflare-pages/tsconfig.json +0 -17
package/package.json
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"typecheck": "tsc --noEmit"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@builder.io/qwik": "0.0.
|
|
17
|
-
"@types/node": "
|
|
16
|
+
"@builder.io/qwik": "0.0.24",
|
|
17
|
+
"@types/node": "latest",
|
|
18
18
|
"node-fetch": "2.6.7",
|
|
19
|
-
"typescript": "4.
|
|
19
|
+
"typescript": "4.7.2",
|
|
20
20
|
"vite": "2.9.9"
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://qwik.builder.io/",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Welcome
|
|
3
|
-
path: /
|
|
4
3
|
---
|
|
5
4
|
|
|
6
|
-
import { Counter } from '../
|
|
5
|
+
import { Counter } from '../components/counter/counter';
|
|
7
6
|
|
|
8
7
|
# Welcome
|
|
9
8
|
|
|
10
|
-
Welcome to the
|
|
9
|
+
Welcome to the fabolous Qwik City. QwikCity is our official kit to build amazing sites:
|
|
11
10
|
|
|
12
11
|
- 🐎 Powered by Qwik. Zero hydration and instant interactivity.
|
|
13
12
|
- 🗃 File based routing (like Nextjs)
|
|
14
13
|
- 🌏 Deploy easily to edge: Netlify, Cloudflare, Vercel, Deno...
|
|
15
|
-
- 📖 Author content directly in Markdown or MDX. MDX brings the best of markdown and JSX,
|
|
14
|
+
- 📖 Author content directly in Markdown or MDX. MDX brings the best of markdown and JSX, allowing you to render Qwik components directly in markdown, like this one:
|
|
16
15
|
|
|
17
16
|
<Counter />
|
|
18
17
|
|
|
@@ -25,4 +24,3 @@ Open your editor and check the following:
|
|
|
25
24
|
This way you can reuse easily the layout across different content. By default, the `src/layout/default` is used.
|
|
26
25
|
- **The `src/components` folder**: QwikCity is still a normal Qwik app. Any custom component, design systems, or funcionality should live here. Notice the `header`, `footer` and `content-nav` components. They are used by the `default` layout!
|
|
27
26
|
- **The `src/utils` folder**: Place here business logic, or functions that are not components.
|
|
28
|
-
- **The `src/utils` folder**: Place here business logic, or functions that are not components.
|
|
@@ -5,13 +5,11 @@ import { resolve } from 'path';
|
|
|
5
5
|
/* VITE_IMPORTS */
|
|
6
6
|
|
|
7
7
|
export default defineConfig(() => {
|
|
8
|
-
const pagesDir = resolve('pages');
|
|
9
|
-
|
|
10
8
|
return {
|
|
11
9
|
/* VITE_CONFIG */
|
|
12
10
|
plugins: [
|
|
13
11
|
qwikCity({
|
|
14
|
-
pagesDir,
|
|
12
|
+
pagesDir: resolve('src', 'pages'),
|
|
15
13
|
layouts: {
|
|
16
14
|
default: resolve('src', 'layouts', 'default', 'default.tsx'),
|
|
17
15
|
},
|
|
@@ -18,10 +18,11 @@ export const App = component$(() => {
|
|
|
18
18
|
const todos = useStore<Todos>({
|
|
19
19
|
filter: 'all',
|
|
20
20
|
items: [
|
|
21
|
-
{ completed: false, title: 'Read Qwik docs' },
|
|
22
|
-
{ completed: false, title: 'Build HelloWorld' },
|
|
23
|
-
{ completed: false, title: 'Profit' },
|
|
21
|
+
{ completed: false, title: 'Read Qwik docs', id: '0' },
|
|
22
|
+
{ completed: false, title: 'Build HelloWorld', id: '1' },
|
|
23
|
+
{ completed: false, title: 'Profit', id: '2' },
|
|
24
24
|
],
|
|
25
|
+
nextItemId: 3,
|
|
25
26
|
});
|
|
26
27
|
useContextProvider(TODOS, todos);
|
|
27
28
|
|
|
@@ -7,6 +7,7 @@ import { createContext } from '@builder.io/qwik';
|
|
|
7
7
|
export const TODOS = createContext<Todos>('TodoApp');
|
|
8
8
|
|
|
9
9
|
export interface TodoItem {
|
|
10
|
+
id: string;
|
|
10
11
|
completed: boolean;
|
|
11
12
|
title: string;
|
|
12
13
|
}
|
|
@@ -14,6 +15,7 @@ export interface TodoItem {
|
|
|
14
15
|
export interface Todos {
|
|
15
16
|
filter: FilterStates;
|
|
16
17
|
items: TodoItem[];
|
|
18
|
+
nextItemId: number;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export type FilterStates = 'all' | 'active' | 'completed';
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@types/eslint": "8.4.2",
|
|
8
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
9
|
-
"@typescript-eslint/parser": "5.
|
|
8
|
+
"@typescript-eslint/eslint-plugin": "5.27.0",
|
|
9
|
+
"@typescript-eslint/parser": "5.27.0",
|
|
10
10
|
"eslint-plugin-qwik": "latest",
|
|
11
|
-
"eslint": "8.
|
|
11
|
+
"eslint": "8.16.0"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ import { render } from './entry.ssr';
|
|
|
3
3
|
/**
|
|
4
4
|
* Cloudflare Pages Request Handler
|
|
5
5
|
*/
|
|
6
|
-
export const onRequestGet
|
|
6
|
+
export const onRequestGet = async ({ request, next, waitUntil }: any) => {
|
|
7
7
|
try {
|
|
8
8
|
const url = new URL(request.url);
|
|
9
9
|
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2017",
|
|
4
|
-
"module": "ES2020",
|
|
5
|
-
"lib": ["es2020", "DOM"],
|
|
6
|
-
"jsx": "react-jsx",
|
|
7
|
-
"jsxImportSource": "@builder.io/qwik",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"incremental": true,
|
|
14
|
-
"types": ["vite/client", "@cloudflare/workers-types"]
|
|
15
|
-
},
|
|
16
|
-
"include": ["src"]
|
|
17
|
-
}
|