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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.0.21",
3
+ "version": "0.0.24",
4
4
  "description": "Interactive CLI and API for generating Qwik projects.",
5
5
  "bin": "create-qwik",
6
6
  "main": "index.js",
@@ -13,10 +13,10 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "devDependencies": {
16
- "@builder.io/qwik": "0.0.21",
17
- "@types/node": "17.0.34",
16
+ "@builder.io/qwik": "0.0.24",
17
+ "@types/node": "latest",
18
18
  "node-fetch": "2.6.7",
19
- "typescript": "4.6.4",
19
+ "typescript": "4.7.2",
20
20
  "vite": "2.9.9"
21
21
  },
22
22
  "homepage": "https://qwik.builder.io/",
@@ -9,6 +9,6 @@
9
9
  ]
10
10
  },
11
11
  "devDependencies": {
12
- "@builder.io/qwik-city": "0.0.10"
12
+ "@builder.io/qwik-city": "0.0.12"
13
13
  }
14
14
  }
@@ -1,18 +1,17 @@
1
1
  ---
2
2
  title: Welcome
3
- path: /
4
3
  ---
5
4
 
6
- import { Counter } from '../src/components/counter/counter';
5
+ import { Counter } from '../components/counter/counter';
7
6
 
8
7
  # Welcome
9
8
 
10
- Welcome to the favolous Qwik City. QwikCity is our official kit to build amazing sites:
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, allow to render Qwik components directly in markdown, like this one:
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
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "Blank Qwik starter app with Partytown.",
3
3
  "dependencies": {
4
- "@builder.io/partytown": "^0.3.1"
4
+ "@builder.io/partytown": "latest"
5
5
  },
6
6
  "qwik": {
7
7
  "priority": 0,
@@ -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
 
@@ -8,7 +8,7 @@ export const Body = component$(() => {
8
8
  <Host class="main">
9
9
  <ul class="todo-list">
10
10
  {todos.items.filter(FILTERS[todos.filter]).map((key) => (
11
- <Item item={key} />
11
+ <Item item={key} key={key.id} />
12
12
  ))}
13
13
  </ul>
14
14
  </Host>
@@ -25,6 +25,7 @@ export const Header = component$(
25
25
  todos.items.push({
26
26
  completed: false,
27
27
  title: state.text,
28
+ id: `${todos.nextItemId++}`,
28
29
  });
29
30
  state.text = '';
30
31
  }
@@ -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.25.0",
9
- "@typescript-eslint/parser": "5.25.0",
8
+ "@typescript-eslint/eslint-plugin": "5.27.0",
9
+ "@typescript-eslint/parser": "5.27.0",
10
10
  "eslint-plugin-qwik": "latest",
11
- "eslint": "8.15.0"
11
+ "eslint": "8.16.0"
12
12
  }
13
13
  }
@@ -2,7 +2,7 @@
2
2
  "description": "Tailwind CSS framework.",
3
3
  "devDependencies": {
4
4
  "autoprefixer": "10.4.7",
5
- "postcss": "8.4.13",
5
+ "postcss": "8.4.14",
6
6
  "tailwindcss": "3.0.24"
7
7
  }
8
8
  }
@@ -5,7 +5,6 @@
5
5
  "serve": "wrangler pages dev ./dist"
6
6
  },
7
7
  "devDependencies": {
8
- "@cloudflare/workers-types": "3.9.0",
9
8
  "wrangler": "beta"
10
9
  },
11
10
  "qwik": {
@@ -3,7 +3,7 @@ import { render } from './entry.ssr';
3
3
  /**
4
4
  * Cloudflare Pages Request Handler
5
5
  */
6
- export const onRequestGet: PagesFunction = async ({ request, next, waitUntil }) => {
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
- }