create-qwik 2.0.0-beta.11 → 2.0.0-beta.14

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.
@@ -27,7 +27,7 @@ build
27
27
  .vscode
28
28
  .rollup.cache
29
29
  tsconfig.tsbuildinfo
30
- vite.config.mts
30
+ vite.config.ts
31
31
  *.spec.tsx
32
32
  *.spec.ts
33
33
  .netlify
@@ -16,18 +16,18 @@
16
16
  "qwik": "qwik"
17
17
  },
18
18
  "devDependencies": {
19
- "@qwik.dev/core": "^2.0.0-beta.11",
20
- "@qwik.dev/router": "^2.0.0-beta.11",
19
+ "@qwik.dev/core": "^2.0.0-beta.14",
20
+ "@qwik.dev/router": "^2.0.0-beta.14",
21
21
  "@eslint/js": "latest",
22
22
  "@types/node": "24.3.0",
23
- "typescript-eslint": "8.41.0",
23
+ "typescript-eslint": "8.45.0",
24
24
  "eslint": "9.33.0",
25
- "eslint-plugin-qwik": "^2.0.0-beta.11",
26
- "globals": "16.3.0",
25
+ "eslint-plugin-qwik": "^2.0.0-beta.14",
26
+ "globals": "16.4.0",
27
27
  "prettier": "3.6.2",
28
- "typescript": "5.9.2",
28
+ "typescript": "5.9.3",
29
29
  "typescript-plugin-css-modules": "latest",
30
- "vite": "7.1.7",
30
+ "vite": "7.1.11",
31
31
  "vite-tsconfig-paths": "^4.2.1"
32
32
  },
33
33
  "engines": {
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "e2e-library",
3
+ "type": "module"
4
+ }
@@ -5,23 +5,22 @@
5
5
  "private": false,
6
6
  "main": "./lib/index.qwik.mjs",
7
7
  "qwik": "./lib/index.qwik.mjs",
8
- "types": "./lib-types/index.d.ts",
8
+ "types": "./lib/index.d.ts",
9
9
  "type": "module",
10
10
  "exports": {
11
11
  ".": {
12
+ "types": "./lib/index.d.ts",
12
13
  "import": "./lib/index.qwik.mjs",
13
- "require": "./lib/index.qwik.cjs",
14
- "types": "./lib-types/index.d.ts"
14
+ "require": "./lib/index.qwik.cjs"
15
15
  }
16
16
  },
17
17
  "files": [
18
- "lib",
19
- "lib-types"
18
+ "lib"
20
19
  ],
21
20
  "scripts": {
22
21
  "build": "qwik build",
23
22
  "build.lib": "vite build --mode lib",
24
- "build.types": "tsc --emitDeclarationOnly",
23
+ "build.types": "tsc -p tsconfig.types.json --emitDeclarationOnly --incremental false",
25
24
  "dev": "vite --mode ssr",
26
25
  "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
27
26
  "fmt": "prettier --write .",
@@ -33,17 +32,18 @@
33
32
  "release": "np"
34
33
  },
35
34
  "devDependencies": {
36
- "@qwik.dev/core": "2.0.0-beta.11",
35
+ "@qwik.dev/core": "2.0.0-beta.14",
36
+ "@qwik.dev/router": "latest",
37
37
  "@eslint/js": "latest",
38
38
  "@types/node": "24.3.0",
39
- "typescript-eslint": "8.41.0",
39
+ "typescript-eslint": "8.45.0",
40
40
  "eslint": "9.33.0",
41
- "eslint-plugin-qwik": "2.0.0-beta.11",
42
- "globals": "16.3.0",
41
+ "eslint-plugin-qwik": "2.0.0-beta.14",
42
+ "globals": "16.4.0",
43
43
  "np": "^8.0.4",
44
44
  "prettier": "3.6.2",
45
- "typescript": "5.9.2",
46
- "vite": "7.1.7",
45
+ "typescript": "5.9.3",
46
+ "vite": "7.1.11",
47
47
  "vite-tsconfig-paths": "^4.2.1"
48
48
  },
49
49
  "__qwik__": {
@@ -0,0 +1,31 @@
1
+ /**
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * SSR renderer function, used by Qwik Router.
5
+ *
6
+ * Note that this is the only place the Qwik renderer is called.
7
+ * On the client, containers resume and do not call render.
8
+ */
9
+ import { createRenderer } from "@qwik.dev/router";
10
+ import Root from "./root";
11
+
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
+ },
29
+ },
30
+ };
31
+ });
@@ -1,23 +1,35 @@
1
- import { Counter } from "./components/counter/counter";
2
- import { Logo } from "./components/logo/logo";
1
+ import { component$ } from "@qwik.dev/core";
2
+ import {
3
+ DocumentHeadTags,
4
+ RouterOutlet,
5
+ useLocation,
6
+ useQwikRouter,
7
+ } from "@qwik.dev/router";
8
+
9
+ import "./global.css";
10
+
11
+ export default component$(() => {
12
+ useQwikRouter();
13
+ const { url } = useLocation();
14
+
15
+ /**
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.
17
+ */
3
18
 
4
- export default () => {
5
19
  return (
6
20
  <>
7
21
  <head>
8
22
  <meta charset="utf-8" />
9
- <title>Qwik Library Starter</title>
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} />
10
29
  </head>
11
30
  <body>
12
- <h1>Qwik Library Starter</h1>
13
- <p>
14
- This is a Qwik library starter. Make your components and export them
15
- from `src/index.ts`. This playground app will not be bundled with your
16
- library.
17
- </p>
18
- <Logo />
19
- <Counter />
31
+ <RouterOutlet />
20
32
  </body>
21
33
  </>
22
34
  );
23
- };
35
+ });
@@ -0,0 +1,19 @@
1
+ import { component$ } from "@qwik.dev/core";
2
+ import { Logo } from "../components/logo/logo";
3
+ import { Counter } from "../components/counter/counter";
4
+
5
+ export default component$(() => {
6
+ return (
7
+ <>
8
+ <h1>Qwik Library Starter</h1>
9
+ <p>
10
+ This is a playground meant for testing your library. Make your
11
+ components and export them from `src/index.ts`. This playground app will
12
+ not be bundled with your library. You can use the Router like a normal
13
+ Qwik app with the Qwik Router.
14
+ </p>
15
+ <Logo />
16
+ <Counter />
17
+ </>
18
+ );
19
+ });
@@ -8,7 +8,7 @@
8
8
  "jsxImportSource": "@qwik.dev/core",
9
9
  "strict": true,
10
10
  "declaration": true,
11
- "declarationDir": "lib-types",
11
+ "declarationDir": "lib",
12
12
  "resolveJsonModule": true,
13
13
  "moduleResolution": "Bundler",
14
14
  "esModuleInterop": true,
@@ -0,0 +1,15 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "emitDeclarationOnly": true,
6
+ "declarationDir": "lib",
7
+ "noEmit": false
8
+ },
9
+ "exclude": [
10
+ "src/routes/**",
11
+ "src/root.tsx",
12
+ "src/entry.ssr.tsx",
13
+ "src/entry.dev.tsx"
14
+ ]
15
+ }
@@ -1,7 +1,8 @@
1
1
  import { qwikVite } from "@qwik.dev/core/optimizer";
2
+ import { qwikRouter } from "@qwik.dev/router/vite";
2
3
  import { defineConfig } from "vite";
3
- import tsconfigPaths from "vite-tsconfig-paths";
4
4
  import pkg from "./package.json";
5
+ import tsconfigPaths from "vite-tsconfig-paths";
5
6
 
6
7
  const { dependencies = {}, peerDependencies = {} } = pkg as any;
7
8
  const makeRegex = (dep) => new RegExp(`^${dep}(/.*)?$`);
@@ -10,6 +11,7 @@ const excludeAll = (obj) => Object.keys(obj).map(makeRegex);
10
11
  export default defineConfig(() => {
11
12
  return {
12
13
  build: {
14
+ outDir: "lib",
13
15
  target: "es2020",
14
16
  lib: {
15
17
  entry: "./src/index",
@@ -31,6 +33,6 @@ export default defineConfig(() => {
31
33
  ],
32
34
  },
33
35
  },
34
- plugins: [qwikVite(), tsconfigPaths({ root: "." })],
36
+ plugins: [qwikVite(), qwikRouter(), tsconfigPaths({ root: "." })],
35
37
  };
36
38
  });
package/package.json CHANGED
@@ -1,9 +1,9 @@
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.11",
4
+ "version": "2.0.0-beta.14",
5
5
  "author": "Qwik Team",
6
- "bin": "./create-qwik.cjs",
6
+ "bin": "./create-qwik.mjs",
7
7
  "bugs": "https://github.com/QwikDev/qwik/issues",
8
8
  "devDependencies": {
9
9
  "@clack/prompts": "0.11.0",
@@ -20,7 +20,7 @@
20
20
  "engines-annotation": "Mostly required by sharp which needs a Node-API v9 compatible runtime",
21
21
  "files": [
22
22
  "README.md",
23
- "create-qwik.cjs",
23
+ "create-qwik.mjs",
24
24
  "dist"
25
25
  ],
26
26
  "homepage": "https://qwik.dev/",
@@ -31,10 +31,11 @@
31
31
  "template"
32
32
  ],
33
33
  "license": "MIT",
34
- "main": "./dist/index.cjs",
34
+ "main": "./dist/index.mjs",
35
35
  "repository": {
36
36
  "type": "git",
37
37
  "url": "https://github.com/QwikDev/qwik.git",
38
38
  "directory": "packages/create-qwik"
39
- }
39
+ },
40
+ "type": "module"
40
41
  }
package/create-qwik.cjs DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- const createQwik = require('./dist/index.cjs');
3
- createQwik.runCli();