create-qwik 0.0.108 → 0.0.109

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.
Files changed (130) hide show
  1. package/README.md +7 -19
  2. package/create-qwik.cjs +3 -0
  3. package/index.cjs +121 -0
  4. package/package.json +11 -7
  5. package/starters/apps/base/.prettierignore +6 -0
  6. package/starters/apps/base/README.md +41 -16
  7. package/starters/apps/base/gitignore +4 -6
  8. package/starters/apps/base/package.json +20 -23
  9. package/starters/apps/base/public/favicon.svg +1 -0
  10. package/starters/apps/base/src/entry.preview.tsx +6 -0
  11. package/starters/apps/base/src/entry.ssr.tsx +7 -5
  12. package/starters/apps/base/src/routes/service-worker.ts +9 -0
  13. package/starters/apps/base/tsconfig.json +5 -4
  14. package/starters/apps/base/vite.config.ts +3 -6
  15. package/starters/apps/blank/package.json +2 -15
  16. package/starters/apps/blank/src/components/header/header.css +37 -0
  17. package/starters/apps/blank/src/components/header/header.tsx +34 -0
  18. package/starters/apps/blank/src/components/icons/qwik.tsx +32 -0
  19. package/starters/apps/blank/src/components/router-head/router-head.tsx +43 -0
  20. package/starters/apps/blank/src/global.css +70 -3
  21. package/starters/apps/blank/src/root.tsx +17 -9
  22. package/starters/apps/blank/src/routes/index.tsx +81 -0
  23. package/starters/apps/{qwik-city → blank}/src/routes/layout.tsx +4 -6
  24. package/starters/apps/documentation-site/package.json +9 -0
  25. package/starters/apps/{qwik-city → documentation-site}/src/components/breadcrumbs/breadcrumbs.css +0 -0
  26. package/starters/apps/{qwik-city → documentation-site}/src/components/breadcrumbs/breadcrumbs.tsx +0 -0
  27. package/starters/apps/{qwik-city → documentation-site}/src/components/footer/footer.css +1 -1
  28. package/starters/apps/{qwik-city → documentation-site}/src/components/footer/footer.tsx +13 -6
  29. package/starters/apps/documentation-site/src/components/header/header.css +34 -0
  30. package/starters/apps/documentation-site/src/components/header/header.tsx +26 -0
  31. package/starters/apps/documentation-site/src/components/icons/qwik.tsx +20 -0
  32. package/starters/apps/{qwik-city → documentation-site}/src/components/menu/menu.css +0 -0
  33. package/starters/apps/{qwik-city → documentation-site}/src/components/menu/menu.tsx +5 -5
  34. package/starters/apps/documentation-site/src/components/on-this-page/on-this-page.css +33 -0
  35. package/starters/apps/documentation-site/src/components/on-this-page/on-this-page.tsx +62 -0
  36. package/starters/apps/documentation-site/src/components/router-head/router-head.tsx +43 -0
  37. package/starters/apps/documentation-site/src/global.css +66 -0
  38. package/starters/apps/documentation-site/src/root.tsx +26 -0
  39. package/starters/apps/documentation-site/src/routes/about-us/index.md +15 -0
  40. package/starters/apps/documentation-site/src/routes/docs/advanced/index.md +11 -0
  41. package/starters/apps/documentation-site/src/routes/docs/docs.css +22 -0
  42. package/starters/apps/documentation-site/src/routes/docs/getting-started/index.md +13 -0
  43. package/starters/apps/documentation-site/src/routes/docs/index.md +22 -0
  44. package/starters/apps/documentation-site/src/routes/docs/layout.tsx +25 -0
  45. package/starters/apps/documentation-site/src/routes/docs/menu.md +21 -0
  46. package/starters/apps/documentation-site/src/routes/index.tsx +89 -0
  47. package/starters/apps/documentation-site/src/routes/layout.tsx +15 -0
  48. package/starters/apps/library/package.json +1 -0
  49. package/starters/apps/{qwik-city → library}/tsconfig.json +1 -4
  50. package/starters/apps/library/vite.config.ts +1 -6
  51. package/create-qwik +0 -107
  52. package/index.js +0 -22
  53. package/starters/apps/base/public/favicon.ico +0 -0
  54. package/starters/apps/base/src/root.tsx +0 -14
  55. package/starters/apps/blank/src/components/app/app.tsx +0 -54
  56. package/starters/apps/blank/src/components/logo/logo.tsx +0 -16
  57. package/starters/apps/blank/src/entry.express.tsx +0 -59
  58. package/starters/apps/blank/src/entry.ssr.tsx +0 -15
  59. package/starters/apps/perf.prod/package.json +0 -22
  60. package/starters/apps/perf.prod/src/components/app/app.tsx +0 -189
  61. package/starters/apps/perf.prod/src/entry.express.tsx +0 -59
  62. package/starters/apps/perf.prod/src/entry.ssr.tsx +0 -15
  63. package/starters/apps/perf.prod/src/global.css +0 -3
  64. package/starters/apps/perf.prod/src/root.tsx +0 -18
  65. package/starters/apps/qwik-city/package.json +0 -19
  66. package/starters/apps/qwik-city/public/_headers +0 -2
  67. package/starters/apps/qwik-city/public/favicon.ico +0 -0
  68. package/starters/apps/qwik-city/public/favicons/android-chrome-192x192.png +0 -0
  69. package/starters/apps/qwik-city/public/favicons/android-chrome-256x256.png +0 -0
  70. package/starters/apps/qwik-city/public/favicons/apple-touch-icon.png +0 -0
  71. package/starters/apps/qwik-city/public/favicons/favicon.svg +0 -1
  72. package/starters/apps/qwik-city/public/logos/qwik-logo.svg +0 -1
  73. package/starters/apps/qwik-city/public/logos/qwik.svg +0 -1
  74. package/starters/apps/qwik-city/src/components/counter/counter.tsx +0 -19
  75. package/starters/apps/qwik-city/src/components/head/analytics.tsx +0 -13
  76. package/starters/apps/qwik-city/src/components/head/head.tsx +0 -34
  77. package/starters/apps/qwik-city/src/components/head/social.tsx +0 -10
  78. package/starters/apps/qwik-city/src/components/header/header.css +0 -46
  79. package/starters/apps/qwik-city/src/components/header/header.tsx +0 -36
  80. package/starters/apps/qwik-city/src/global.css +0 -24
  81. package/starters/apps/qwik-city/src/root.tsx +0 -16
  82. package/starters/apps/qwik-city/src/routes/about-us/index.tsx +0 -17
  83. package/starters/apps/qwik-city/src/routes/api/[org]/[user].json/index.ts +0 -15
  84. package/starters/apps/qwik-city/src/routes/api/api.css +0 -14
  85. package/starters/apps/qwik-city/src/routes/api/data.json/index.ts +0 -9
  86. package/starters/apps/qwik-city/src/routes/api/index@api.tsx +0 -34
  87. package/starters/apps/qwik-city/src/routes/api/layout-api.tsx +0 -37
  88. package/starters/apps/qwik-city/src/routes/blog/[...slug]/index.tsx +0 -36
  89. package/starters/apps/qwik-city/src/routes/blog/index.md +0 -7
  90. package/starters/apps/qwik-city/src/routes/blog/layout.tsx +0 -21
  91. package/starters/apps/qwik-city/src/routes/dashboard/dashboard.css +0 -14
  92. package/starters/apps/qwik-city/src/routes/dashboard/index.tsx +0 -15
  93. package/starters/apps/qwik-city/src/routes/dashboard/layout!.tsx +0 -44
  94. package/starters/apps/qwik-city/src/routes/dashboard/profile/index.tsx +0 -15
  95. package/starters/apps/qwik-city/src/routes/dashboard/settings/index.tsx +0 -15
  96. package/starters/apps/qwik-city/src/routes/docs/[category]/[id]/index.tsx +0 -23
  97. package/starters/apps/qwik-city/src/routes/docs/docs.css +0 -10
  98. package/starters/apps/qwik-city/src/routes/docs/getting-started/index.md +0 -44
  99. package/starters/apps/qwik-city/src/routes/docs/index.tsx +0 -14
  100. package/starters/apps/qwik-city/src/routes/docs/layout!.tsx +0 -31
  101. package/starters/apps/qwik-city/src/routes/docs/menu.md +0 -11
  102. package/starters/apps/qwik-city/src/routes/docs/overview/index.md +0 -7
  103. package/starters/apps/qwik-city/src/routes/index.tsx +0 -16
  104. package/starters/apps/qwik-city/src/routes/products/[id]/index.tsx +0 -123
  105. package/starters/apps/qwik-city/vite.config.ts +0 -17
  106. package/starters/features/prettier/.prettierignore +0 -23
  107. package/starters/features/prettier/package.json +0 -10
  108. package/starters/features/react/package.json +0 -26
  109. package/starters/features/react/src/entry.ssr.tsx +0 -11
  110. package/starters/features/react/src/react/app.tsx +0 -14
  111. package/starters/features/tailwindcss/package.json +0 -8
  112. package/starters/features/tailwindcss/postcss.config.cjs +0 -6
  113. package/starters/features/tailwindcss/src/global.css +0 -3
  114. package/starters/features/tailwindcss/tailwind.config.cjs +0 -7
  115. package/starters/servers/cloudflare-pages/.node-version +0 -1
  116. package/starters/servers/cloudflare-pages/README.md +0 -17
  117. package/starters/servers/cloudflare-pages/functions/[[path]].ts +0 -5
  118. package/starters/servers/cloudflare-pages/package.json +0 -18
  119. package/starters/servers/cloudflare-pages/public/_headers +0 -2
  120. package/starters/servers/cloudflare-pages/src/entry.cloudflare.tsx +0 -4
  121. package/starters/servers/express/README.md +0 -9
  122. package/starters/servers/express/package.json +0 -11
  123. package/starters/servers/express/src/entry.express.tsx +0 -31
  124. package/starters/servers/netlify-edge/.node-version +0 -1
  125. package/starters/servers/netlify-edge/README.md +0 -39
  126. package/starters/servers/netlify-edge/netlify.toml +0 -10
  127. package/starters/servers/netlify-edge/package.json +0 -19
  128. package/starters/servers/netlify-edge/public/_headers +0 -2
  129. package/starters/servers/netlify-edge/src/entry.netlify.ts +0 -6
  130. package/starters/servers/netlify-edge/tsconfig.json +0 -17
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.0.108",
4
- "description": "Interactive CLI and API for generating Qwik projects.",
5
- "bin": "create-qwik",
6
- "main": "index.js",
3
+ "version": "0.0.109",
4
+ "description": "Interactive CLI for create Qwik projects and adding features.",
5
+ "bin": "./create-qwik.cjs",
6
+ "main": "./index.cjs",
7
7
  "files": [
8
- "create-qwik",
8
+ "create-qwik.cjs",
9
+ "index.cjs",
9
10
  "starters/"
10
11
  ],
11
12
  "author": "Builder.io Team",
@@ -13,7 +14,9 @@
13
14
  "keywords": [
14
15
  "qwik",
15
16
  "generator",
16
- "builder.io"
17
+ "builder.io",
18
+ "starters",
19
+ "template"
17
20
  ],
18
21
  "homepage": "https://qwik.builder.io/",
19
22
  "repository": {
@@ -27,10 +30,11 @@
27
30
  "devDependencies": {
28
31
  "@types/prompts": "2.0.14",
29
32
  "kleur": "4.1.5",
33
+ "ora": "^6.1.2",
30
34
  "prompts": "2.4.2"
31
35
  },
32
36
  "engines": {
33
- "node": ">=14",
37
+ "node": ">=14.18",
34
38
  "npm": ">=6.0.0"
35
39
  }
36
40
  }
@@ -0,0 +1,6 @@
1
+ # Files Prettier should not format
2
+ **/*.log
3
+ **/.DS_Store
4
+ *.
5
+ dist
6
+ node_modules
@@ -1,41 +1,66 @@
1
- ## Development Builds
1
+ # Qwik App ⚡️
2
2
 
3
- ### Client only
3
+ - [Qwik Docs](https://qwik.builder.io/)
4
+ - [Discord](https://qwik.builder.io/chat)
5
+ - [Qwik Github](https://github.com/BuilderIO/qwik)
6
+ - [@QwikDev](https://twitter.com/QwikDev)
7
+ - [Vite](https://vitejs.dev/)
8
+ - [Partytown](https://partytown.builder.io/)
9
+ - [Mitosis](https://github.com/BuilderIO/mitosis)
10
+ - [Builder.io](https://www.builder.io/)
4
11
 
5
- During development, the index.html is not a result of server-side rendering, but rather the Qwik app is built using client-side JavaScript only. This is ideal for development with Vite and its ability to reload modules quickly and on-demand. However, this mode is only for development and does not showcase "how" Qwik works since JavaScript is required to execute, and Vite imports many development modules for the app to work.
12
+ ---
13
+
14
+ ## Project Structure
15
+
16
+ Inside of you project, you'll see the following directories and files:
6
17
 
7
18
  ```
8
- npm run dev
19
+ ├── public/
20
+ │ └── ...
21
+ └── src/
22
+ ├── components/
23
+ │ └── ...
24
+ └── routes/
25
+ └── ...
9
26
  ```
10
27
 
11
- ### Server-side Rendering (SSR) and Client
28
+ - `src/routes`: Provides the directory based routing, which can include a hierarchy of `layout.tsx` layout files, and `index.tsx` files as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.builder.io/qwikcity/routing/overview/) for more info.
29
+
30
+ - `src/components`: Recommended directory for components.
31
+
32
+ - `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.
12
33
 
13
- Server-side rendered index.html, with client-side modules prefetched and loaded by the browser. This can be used to test out server-side rendered content during development, but will be slower than the client-only development builds.
34
+ ## Add Integrations
35
+
36
+ Use the `npm run qwik add` command to add other integrations. Some examples of integrations include as a Cloudflare, Netlify or Vercel server, and the Static Site Generator (SSG).
14
37
 
15
38
  ```
16
- npm run dev.ssr
39
+ npm run qwik add
17
40
  ```
18
41
 
19
- ## Production Builds
42
+ ## Development
20
43
 
21
- A production build should generate the client and server modules by running both client and server build commands.
44
+ Development mode uses [Vite's development server](https://vitejs.dev/). For Qwik during development, the `dev` command will also server-side render (SSR) the output. The client-side development modules loaded by the browser.
22
45
 
23
46
  ```
24
- npm run build
47
+ npm run dev
25
48
  ```
26
49
 
27
- ### Client Modules
50
+ > Note: during dev mode, Vite will request many JS files, which does not represent a Qwik production build.
28
51
 
29
- Production build that creates only the client-side modules that are dynamically imported by the browser.
52
+ ## Preview
53
+
54
+ The preview command will create a production build of the client modules, production build of `src/entry.preview.tsx`, and create a local server. The preview server is only for convenience to locally preview a production build, but it should not be used as a production server.
30
55
 
31
56
  ```
32
- npm run build.client
57
+ npm run preview
33
58
  ```
34
59
 
35
- ### Server Modules
60
+ ## Production
36
61
 
37
- Production build that creates the server-side render (SSR) module that is used by the server to render the HTML.
62
+ The production build should generate the client and server modules by running both client and server build commands. Additionally, the build command will use Typescript run a type check on the source.
38
63
 
39
64
  ```
40
- npm run build.ssr
65
+ npm run build
41
66
  ```
@@ -1,9 +1,7 @@
1
1
  # Build
2
- build
3
- dist
4
- lib
5
- server
6
- functions/**/*.js
2
+ /dist
3
+ /lib
4
+ /server
7
5
 
8
6
  # Development
9
7
  node_modules
@@ -36,4 +34,4 @@ lerna-debug.log*
36
34
 
37
35
  # Yarn
38
36
  .yarn/*
39
- !.yarn/releases
37
+ !.yarn/releases
@@ -1,35 +1,32 @@
1
1
  {
2
2
  "name": "qwik-project-name",
3
- "description": "",
4
- "license": "",
5
3
  "scripts": {
6
- "build": "npm run typecheck && npm run build.client && npm run build.ssr",
4
+ "build": "qwik build",
7
5
  "build.client": "vite build",
8
- "build.ssr": "vite build --ssr src/entry.ssr.tsx",
9
- "dev": "npm run dev.ssr",
10
- "dev.client": "vite",
11
- "dev.ssr": "node --inspect node_modules/vite/bin/vite.js --mode ssr",
12
- "dev.debug": "node --inspect-brk node_modules/vite/bin/vite.js --force --mode ssr",
13
- "start": "npm run dev",
6
+ "build.preview": "vite build --ssr src/entry.preview.tsx",
7
+ "dev": "vite --mode ssr",
8
+ "fmt": "prettier --write .",
9
+ "fmt.check": "prettier --check .",
14
10
  "lint": "eslint \"src/**/*.ts*\"",
15
- "typecheck": "tsc --incremental --noEmit"
11
+ "preview": "qwik build preview && vite preview",
12
+ "start": "vite --mode ssr",
13
+ "typecheck": "tsc --incremental --noEmit",
14
+ "qwik": "qwik"
16
15
  },
17
16
  "devDependencies": {
18
- "@builder.io/qwik": "0.0.108",
17
+ "@builder.io/qwik": "0.0.109",
18
+ "@builder.io/qwik-city": "0.0.110",
19
19
  "@types/eslint": "8.4.6",
20
20
  "@types/node": "latest",
21
- "@typescript-eslint/eslint-plugin": "5.34.0",
22
- "@typescript-eslint/parser": "5.34.0",
23
- "eslint-plugin-qwik": "0.0.108",
24
- "eslint": "8.22.0",
21
+ "@typescript-eslint/eslint-plugin": "5.37.0",
22
+ "@typescript-eslint/parser": "5.37.0",
23
+ "eslint-plugin-qwik": "0.0.109",
24
+ "eslint": "8.23.1",
25
25
  "node-fetch": "3.2.10",
26
- "typescript": "4.7.4",
27
- "vite": "3.0.9"
26
+ "prettier": "2.7.1",
27
+ "typescript": "4.8.3",
28
+ "vite": "3.1.1",
29
+ "vite-tsconfig-paths": "3.5.0"
28
30
  },
29
- "type": "module",
30
- "homepage": "https://qwik.builder.io/",
31
- "private": true,
32
- "engines": {
33
- "node": "^14.18.0 || >=16.0.0"
34
- }
31
+ "private": true
35
32
  }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 500 500"><g clip-path="url(#a)"><circle cx="250" cy="250" r="250" fill="#fff"/><path fill="#18B6F6" d="m367.87 418.45-61.17-61.18-.94.13v-.67L175.7 227.53l32.05-31.13L188.9 87.73 99.56 199.09c-15.22 15.42-18.03 40.51-7.08 59.03l55.83 93.11a46.82 46.82 0 0 0 40.73 22.81l27.65-.27 151.18 44.68Z"/><path fill="#AC7EF4" d="m401.25 196.94-12.29-22.81-6.41-11.67-2.54-4.56-.26.26-33.66-58.63a47.07 47.07 0 0 0-41.27-23.75l-29.51.8-88.01.28a47.07 47.07 0 0 0-40.33 23.34L93.4 207l95.76-119.54L314.7 226.19l-22.3 22.67 13.35 108.54.13-.26v.26h-.26l.26.27 10.42 10.2 50.62 49.78c2.13 2 5.6-.4 4.13-2.96l-31.25-61.85 54.5-101.3 1.73-2c.67-.81 1.33-1.62 1.87-2.42a46.8 46.8 0 0 0 3.34-50.18Z"/><path fill="#fff" d="M315.1 225.65 189.18 87.6l17.9 108.14L175 227l130.5 130.27-11.75-108.14 21.37-23.48Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h500v500H0z"/></clipPath></defs></svg>
@@ -0,0 +1,6 @@
1
+ import { qwikCity } from '@builder.io/qwik-city/middleware/node';
2
+ import render from './entry.ssr';
3
+
4
+ // Create the Qwik City ssr preview middleware
5
+ // Imported by vite preview
6
+ export default qwikCity(render);
@@ -2,14 +2,16 @@ import { renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server';
2
2
  import { manifest } from '@qwik-client-manifest';
3
3
  import Root from './root';
4
4
 
5
- /**
6
- * Server-Side Render method to be called by a server.
7
- */
8
5
  export default function (opts: RenderToStreamOptions) {
9
- // Render the Root component to a string
10
- // Pass in the manifest that was generated from the client build
11
6
  return renderToStream(<Root />, {
12
7
  manifest,
13
8
  ...opts,
9
+ prefetchStrategy: {
10
+ implementation: {
11
+ linkInsert: null,
12
+ workerFetchInsert: null,
13
+ prefetchEvent: 'always',
14
+ },
15
+ },
14
16
  });
15
17
  }
@@ -0,0 +1,9 @@
1
+ declare const self: ServiceWorkerGlobalScope;
2
+
3
+ import { setupServiceWorker } from '@builder.io/qwik-city/service-worker';
4
+
5
+ setupServiceWorker();
6
+
7
+ addEventListener('install', () => self.skipWaiting());
8
+
9
+ addEventListener('activate', () => self.clients.claim());
@@ -3,19 +3,20 @@
3
3
  "allowJs": true,
4
4
  "target": "ES2017",
5
5
  "module": "ES2020",
6
- "lib": ["es2020", "DOM"],
6
+ "lib": ["es2020", "DOM", "WebWorker"],
7
7
  "jsx": "react-jsx",
8
8
  "jsxImportSource": "@builder.io/qwik",
9
9
  "strict": true,
10
- "declaration": true,
11
- "declarationDir": "lib/types",
12
10
  "resolveJsonModule": true,
13
11
  "moduleResolution": "node",
14
12
  "esModuleInterop": true,
15
13
  "skipLibCheck": true,
16
14
  "incremental": true,
17
15
  "isolatedModules": true,
18
- "types": ["vite/client"]
16
+ "types": ["node", "vite/client"],
17
+ "paths": {
18
+ "~/*": ["./src/*"]
19
+ }
19
20
  },
20
21
  "include": ["src"]
21
22
  }
@@ -1,13 +1,10 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import { qwikVite } from '@builder.io/qwik/optimizer';
3
- /* VITE_IMPORTS */
3
+ import { qwikCity } from '@builder.io/qwik-city/vite';
4
+ import tsconfigPaths from 'vite-tsconfig-paths';
4
5
 
5
6
  export default defineConfig(() => {
6
7
  return {
7
- /* VITE_CONFIG */
8
- plugins: [
9
- qwikVite(/* VITE_QWIK */),
10
- /* VITE_PLUGINS */
11
- ],
8
+ plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
12
9
  };
13
10
  });
@@ -1,22 +1,9 @@
1
1
  {
2
+ "name": "qwik-blank-starter",
2
3
  "description": "Blank Qwik starter app.",
3
- "scripts": {
4
- "build.ssr": "vite build --ssr src/entry.express.tsx",
5
- "serve": "node server/entry.express"
6
- },
7
- "devDependencies": {
8
- "@types/express": "4.17.13",
9
- "express": "4.17.3"
10
- },
11
4
  "type": "module",
12
5
  "__qwik__": {
13
6
  "priority": 0,
14
- "featureOptions": [
15
- "prettier",
16
- "tailwindcss"
17
- ],
18
- "featureEnabled": [
19
- "prettier"
20
- ]
7
+ "qwikCity": true
21
8
  }
22
9
  }
@@ -0,0 +1,37 @@
1
+ header {
2
+ background: var(--qwik-purple);
3
+ }
4
+ header {
5
+ display: flex;
6
+ background: white;
7
+ border-bottom: 10px solid var(--qwik-dark-purple);
8
+ }
9
+
10
+ header .logo a {
11
+ display: inline-block;
12
+ padding: 10px 10px 7px 20px;
13
+ }
14
+
15
+ header ul {
16
+ margin: 0;
17
+ padding: 3px 10px 0 0;
18
+ list-style: none;
19
+ flex: 1;
20
+ text-align: right;
21
+ }
22
+
23
+ header li {
24
+ display: inline-block;
25
+ margin: 0;
26
+ padding: 0;
27
+ }
28
+
29
+ header li a {
30
+ display: inline-block;
31
+ padding: 15px 10px;
32
+ text-decoration: none;
33
+ }
34
+
35
+ header li a:hover {
36
+ text-decoration: underline;
37
+ }
@@ -0,0 +1,34 @@
1
+ import { component$, useStyles$ } from '@builder.io/qwik';
2
+ import { QwikLogo } from '../icons/qwik';
3
+ import styles from './header.css';
4
+
5
+ export default component$(() => {
6
+ useStyles$(styles);
7
+
8
+ return (
9
+ <header>
10
+ <div class="logo">
11
+ <a href="https://qwik.builder.io/" target="_blank">
12
+ <QwikLogo />
13
+ </a>
14
+ </div>
15
+ <ul>
16
+ <li>
17
+ <a href="https://qwik.builder.io/" target="_blank">
18
+ Docs
19
+ </a>
20
+ </li>
21
+ <li>
22
+ <a href="https://qwik.builder.io/examples/introduction/hello-world/" target="_blank">
23
+ Examples
24
+ </a>
25
+ </li>
26
+ <li>
27
+ <a href="https://qwik.builder.io/tutorial/welcome/overview/" target="_blank">
28
+ Tutorials
29
+ </a>
30
+ </li>
31
+ </ul>
32
+ </header>
33
+ );
34
+ });
@@ -0,0 +1,32 @@
1
+ export const QwikLogo = () => (
2
+ <svg width="100" height="35" viewBox="0 0 167 53" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M81.9545 46.5859H75.5513V35.4045C73.4363 36.8579 71.0496 37.5749 68.4884 37.5749C65.0151 37.5749 62.4344 36.6253 60.8239 34.6487C59.2134 32.6915 58.3984 29.2034 58.3984 24.2231C58.3984 19.1266 59.3492 15.5997 61.2702 13.5456C63.23 11.4721 66.3734 10.4644 70.7004 10.4644C74.7946 10.4644 78.5201 11.0264 81.9545 12.131V46.5859ZM75.5513 16.278C74.096 15.8323 72.4661 15.6191 70.7004 15.6191C68.5272 15.6191 66.9749 16.1811 66.1017 17.3244C65.2479 18.4871 64.7823 20.6962 64.7823 23.9712C64.7823 27.0524 65.1897 29.1065 66.0435 30.2304C66.8973 31.335 68.3719 31.897 70.5452 31.897C73.3781 31.897 75.5513 30.7343 75.5513 29.2809V16.278Z"
5
+ fill="black"
6
+ />
7
+ <path
8
+ d="M91.133 11.1426C93.4033 17.4406 95.3242 23.7386 96.993 30.0948C99.205 23.5836 101.087 17.2856 102.542 11.1426H108.15C110.265 17.4406 112.031 23.7386 113.447 30.0948C115.97 23.196 117.949 16.8787 119.404 11.1426H125.71C123.033 20.173 120.064 28.777 116.785 36.8966H109.256C108.402 32.3039 107.044 26.7617 105.22 20.1536C104.056 25.2889 102.445 30.8893 100.33 36.8966H92.8018C90.2793 27.5174 87.5434 18.9522 84.6328 11.1426H91.133Z"
9
+ fill="black"
10
+ />
11
+ <path
12
+ d="M132.832 7.55758C129.999 7.55758 129.203 6.85996 129.203 3.97257C129.203 1.39523 130.018 0.794495 132.832 0.794495C135.665 0.794495 136.46 1.39523 136.46 3.97257C136.46 6.85996 135.665 7.55758 132.832 7.55758ZM129.649 11.1426H136.053V36.8966H129.649V11.1426Z"
13
+ fill="black"
14
+ />
15
+ <path
16
+ d="M166.303 11.1426C161.763 17.5956 158.581 21.5295 156.815 22.9441C158.27 23.8937 162.17 28.8933 167.002 36.916H159.628C153.613 27.7887 150.742 23.8549 149.325 23.2542V36.916H142.922V0H149.325V23.2348C150.78 22.169 153.963 18.1382 158.872 11.1426H166.303Z"
17
+ fill="black"
18
+ />
19
+ <path
20
+ d="M40.973 52.5351L32.0861 43.6985L31.9503 43.7179V43.621L13.0511 24.9595L17.708 20.4637L14.9721 4.76715L1.99103 20.8513C-0.220992 23.0798 -0.628467 26.7036 0.962635 29.3778L9.07337 42.8265C10.3152 44.9 12.566 46.1402 14.9915 46.1208L19.0081 46.082L40.973 52.5351Z"
21
+ fill="#18B6F6"
22
+ />
23
+ <path
24
+ d="M45.8232 20.5411L44.038 17.2468L43.1066 15.5609L42.738 14.902L42.6992 14.9408L37.8094 6.47238C36.587 4.34075 34.2974 3.02301 31.8137 3.04239L27.5255 3.15865L14.7384 3.19741C12.313 3.21679 10.101 4.49577 8.87853 6.56927L1.09766 21.9945L15.0101 4.72831L33.2496 24.7656L30.0091 28.0406L31.9495 43.7178L31.9689 43.679V43.7178H31.9301L31.9689 43.7565L33.4824 45.2293L40.8364 52.4187C41.1469 52.7094 41.6514 52.3606 41.4379 51.9924L36.8975 43.0589L44.8142 28.4282L45.0664 28.1375C45.1634 28.0212 45.2604 27.905 45.3381 27.7887C46.8904 25.6764 47.1038 22.8472 45.8232 20.5411Z"
25
+ fill="#AC7EF4"
26
+ />
27
+ <path
28
+ d="M33.3076 24.6882L15.0099 4.74774L17.61 20.3668L12.9531 24.882L31.9105 43.6985L30.203 28.0794L33.3076 24.6882Z"
29
+ fill="white"
30
+ />
31
+ </svg>
32
+ );
@@ -0,0 +1,43 @@
1
+ import { component$ } from '@builder.io/qwik';
2
+ import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
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.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
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
20
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
21
+ <link
22
+ href="https://fonts.googleapis.com/css2?family=Poppins&amp;display=swap"
23
+ rel="stylesheet"
24
+ />
25
+
26
+ <meta property="og:site_name" content="Qwik" />
27
+ <meta name="twitter:site" content="@QwikDev" />
28
+ <meta name="twitter:title" content="Qwik" />
29
+
30
+ {head.meta.map((m) => (
31
+ <meta {...m} />
32
+ ))}
33
+
34
+ {head.links.map((l) => (
35
+ <link {...l} />
36
+ ))}
37
+
38
+ {head.styles.map((s) => (
39
+ <style {...s.props} dangerouslySetInnerHTML={s.style} />
40
+ ))}
41
+ </>
42
+ );
43
+ });
@@ -1,3 +1,70 @@
1
- /**
2
- * Write here your global css styles
3
- */
1
+ :root {
2
+ --qwik-dark-blue: #006ce9;
3
+ --qwik-light-blue: #18b6f6;
4
+ --qwik-light-purple: #ac7ff4;
5
+ --qwik-dark-purple: #713fc2;
6
+ }
7
+
8
+ body {
9
+ background-color: #fafafa;
10
+ font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
11
+ padding: 20px;
12
+ }
13
+
14
+ main {
15
+ max-width: 720px;
16
+ margin: 0 auto;
17
+ background-color: white;
18
+ border-radius: 5px;
19
+ box-shadow: 0px 0px 130px -50px var(--qwik-light-purple);
20
+ overflow: hidden;
21
+ }
22
+
23
+ h1 {
24
+ margin-top: 0;
25
+ }
26
+
27
+ .lightning {
28
+ filter: hue-rotate(180deg);
29
+ }
30
+
31
+ section {
32
+ padding: 20px;
33
+ border-bottom: 10px solid var(--qwik-dark-blue);
34
+ }
35
+
36
+ ul {
37
+ list-style-type: square;
38
+ margin: 10px 0 40px 0;
39
+ }
40
+
41
+ li {
42
+ padding: 5px 0;
43
+ }
44
+
45
+ li::marker {
46
+ color: var(--qwik-light-blue);
47
+ }
48
+
49
+ a,
50
+ a:visited {
51
+ color: var(--qwik-dark-blue);
52
+ }
53
+
54
+ a:hover {
55
+ text-decoration: none;
56
+ }
57
+
58
+ table {
59
+ margin: 10px 0 40px 0;
60
+ }
61
+
62
+ .commands td:last-child {
63
+ padding-left: 20px;
64
+ }
65
+
66
+ code {
67
+ font-family: Menlo, Monaco, Courier New, monospace;
68
+ color: var(--qwik-dark-blue);
69
+ padding: 0 4px;
70
+ }
@@ -1,18 +1,26 @@
1
- import { App } from './components/app/app';
1
+ import { component$ } from '@builder.io/qwik';
2
+ import { QwikCity, RouterOutlet, ServiceWorkerRegister } from '@builder.io/qwik-city';
3
+ import { RouterHead } from './components/router-head/router-head';
2
4
 
3
5
  import './global.css';
4
6
 
5
- export default () => {
7
+ export default component$(() => {
8
+ /*
9
+ * The root of a QwikCity site always start with the <QwikCity> component,
10
+ * immediately followed by the document's <head> and <body>.
11
+ *
12
+ * Dont remove the `<head>` and `<body>` elements.
13
+ */
6
14
  return (
7
- <html>
15
+ <QwikCity>
8
16
  <head>
9
17
  <meta charSet="utf-8" />
10
- <title>Qwik Blank App</title>
11
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
18
+ <RouterHead />
12
19
  </head>
13
- <body>
14
- <App />
20
+ <body lang="en">
21
+ <RouterOutlet />
22
+ <ServiceWorkerRegister />
15
23
  </body>
16
- </html>
24
+ </QwikCity>
17
25
  );
18
- };
26
+ });
@@ -0,0 +1,81 @@
1
+ import { component$ } from '@builder.io/qwik';
2
+ import type { DocumentHead } from '@builder.io/qwik-city';
3
+
4
+ export default component$(() => {
5
+ return (
6
+ <div>
7
+ <h1>
8
+ Welcome to Qwik <span class="lightning">⚡️</span>
9
+ </h1>
10
+
11
+ <ul>
12
+ <li>
13
+ Check out the <code>src/routes</code> directory to get started.
14
+ </li>
15
+ <li>
16
+ Add integrations with <code>npm run qwik add</code>.
17
+ </li>
18
+ <li>
19
+ More info about development in <code>README.md</code>
20
+ </li>
21
+ </ul>
22
+
23
+ <h2>Commands</h2>
24
+
25
+ <table class="commands">
26
+ <tr>
27
+ <td>
28
+ <code>npm run dev</code>
29
+ </td>
30
+ <td>Start the dev server and watch for changes.</td>
31
+ </tr>
32
+ <tr>
33
+ <td>
34
+ <code>npm run preview</code>
35
+ </td>
36
+ <td>Production build and start preview server.</td>
37
+ </tr>
38
+ <tr>
39
+ <td>
40
+ <code>npm run build</code>
41
+ </td>
42
+ <td>Production build.</td>
43
+ </tr>
44
+ <tr>
45
+ <td>
46
+ <code>npm run qwik add</code>
47
+ </td>
48
+ <td>Add integration like edge servers and SSG.</td>
49
+ </tr>
50
+ </table>
51
+
52
+ <h2>Community</h2>
53
+
54
+ <ul>
55
+ <li>
56
+ <span>Questions or just want to say hi? </span>
57
+ <a href="https://qwik.builder.io/chat" target="_blank">
58
+ Chat on discord!
59
+ </a>
60
+ </li>
61
+ <li>
62
+ <span>Follow </span>
63
+ <a href="https://twitter.com/QwikDev" target="_blank">
64
+ @QwikDev
65
+ </a>
66
+ <span> on Twitter</span>
67
+ </li>
68
+ <li>
69
+ <span>Open issues and contribute on </span>
70
+ <a href="https://github.com/BuilderIO/qwik" target="_blank">
71
+ Github
72
+ </a>
73
+ </li>
74
+ </ul>
75
+ </div>
76
+ );
77
+ });
78
+
79
+ export const head: DocumentHead = {
80
+ title: 'Welcome to Qwik',
81
+ };