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.
- package/README.md +7 -19
- package/create-qwik.cjs +3 -0
- package/index.cjs +121 -0
- package/package.json +11 -7
- package/starters/apps/base/.prettierignore +6 -0
- package/starters/apps/base/README.md +41 -16
- package/starters/apps/base/gitignore +4 -6
- package/starters/apps/base/package.json +20 -23
- package/starters/apps/base/public/favicon.svg +1 -0
- package/starters/apps/base/src/entry.preview.tsx +6 -0
- package/starters/apps/base/src/entry.ssr.tsx +7 -5
- package/starters/apps/base/src/routes/service-worker.ts +9 -0
- package/starters/apps/base/tsconfig.json +5 -4
- package/starters/apps/base/vite.config.ts +3 -6
- package/starters/apps/blank/package.json +2 -15
- package/starters/apps/blank/src/components/header/header.css +37 -0
- package/starters/apps/blank/src/components/header/header.tsx +34 -0
- package/starters/apps/blank/src/components/icons/qwik.tsx +32 -0
- package/starters/apps/blank/src/components/router-head/router-head.tsx +43 -0
- package/starters/apps/blank/src/global.css +70 -3
- package/starters/apps/blank/src/root.tsx +17 -9
- package/starters/apps/blank/src/routes/index.tsx +81 -0
- package/starters/apps/{qwik-city → blank}/src/routes/layout.tsx +4 -6
- package/starters/apps/documentation-site/package.json +9 -0
- package/starters/apps/{qwik-city → documentation-site}/src/components/breadcrumbs/breadcrumbs.css +0 -0
- package/starters/apps/{qwik-city → documentation-site}/src/components/breadcrumbs/breadcrumbs.tsx +0 -0
- package/starters/apps/{qwik-city → documentation-site}/src/components/footer/footer.css +1 -1
- package/starters/apps/{qwik-city → documentation-site}/src/components/footer/footer.tsx +13 -6
- package/starters/apps/documentation-site/src/components/header/header.css +34 -0
- package/starters/apps/documentation-site/src/components/header/header.tsx +26 -0
- package/starters/apps/documentation-site/src/components/icons/qwik.tsx +20 -0
- package/starters/apps/{qwik-city → documentation-site}/src/components/menu/menu.css +0 -0
- package/starters/apps/{qwik-city → documentation-site}/src/components/menu/menu.tsx +5 -5
- package/starters/apps/documentation-site/src/components/on-this-page/on-this-page.css +33 -0
- package/starters/apps/documentation-site/src/components/on-this-page/on-this-page.tsx +62 -0
- package/starters/apps/documentation-site/src/components/router-head/router-head.tsx +43 -0
- package/starters/apps/documentation-site/src/global.css +66 -0
- package/starters/apps/documentation-site/src/root.tsx +26 -0
- package/starters/apps/documentation-site/src/routes/about-us/index.md +15 -0
- package/starters/apps/documentation-site/src/routes/docs/advanced/index.md +11 -0
- package/starters/apps/documentation-site/src/routes/docs/docs.css +22 -0
- package/starters/apps/documentation-site/src/routes/docs/getting-started/index.md +13 -0
- package/starters/apps/documentation-site/src/routes/docs/index.md +22 -0
- package/starters/apps/documentation-site/src/routes/docs/layout.tsx +25 -0
- package/starters/apps/documentation-site/src/routes/docs/menu.md +21 -0
- package/starters/apps/documentation-site/src/routes/index.tsx +89 -0
- package/starters/apps/documentation-site/src/routes/layout.tsx +15 -0
- package/starters/apps/library/package.json +1 -0
- package/starters/apps/{qwik-city → library}/tsconfig.json +1 -4
- package/starters/apps/library/vite.config.ts +1 -6
- package/create-qwik +0 -107
- package/index.js +0 -22
- package/starters/apps/base/public/favicon.ico +0 -0
- package/starters/apps/base/src/root.tsx +0 -14
- package/starters/apps/blank/src/components/app/app.tsx +0 -54
- package/starters/apps/blank/src/components/logo/logo.tsx +0 -16
- package/starters/apps/blank/src/entry.express.tsx +0 -59
- package/starters/apps/blank/src/entry.ssr.tsx +0 -15
- package/starters/apps/perf.prod/package.json +0 -22
- package/starters/apps/perf.prod/src/components/app/app.tsx +0 -189
- package/starters/apps/perf.prod/src/entry.express.tsx +0 -59
- package/starters/apps/perf.prod/src/entry.ssr.tsx +0 -15
- package/starters/apps/perf.prod/src/global.css +0 -3
- package/starters/apps/perf.prod/src/root.tsx +0 -18
- package/starters/apps/qwik-city/package.json +0 -19
- package/starters/apps/qwik-city/public/_headers +0 -2
- package/starters/apps/qwik-city/public/favicon.ico +0 -0
- package/starters/apps/qwik-city/public/favicons/android-chrome-192x192.png +0 -0
- package/starters/apps/qwik-city/public/favicons/android-chrome-256x256.png +0 -0
- package/starters/apps/qwik-city/public/favicons/apple-touch-icon.png +0 -0
- package/starters/apps/qwik-city/public/favicons/favicon.svg +0 -1
- package/starters/apps/qwik-city/public/logos/qwik-logo.svg +0 -1
- package/starters/apps/qwik-city/public/logos/qwik.svg +0 -1
- package/starters/apps/qwik-city/src/components/counter/counter.tsx +0 -19
- package/starters/apps/qwik-city/src/components/head/analytics.tsx +0 -13
- package/starters/apps/qwik-city/src/components/head/head.tsx +0 -34
- package/starters/apps/qwik-city/src/components/head/social.tsx +0 -10
- package/starters/apps/qwik-city/src/components/header/header.css +0 -46
- package/starters/apps/qwik-city/src/components/header/header.tsx +0 -36
- package/starters/apps/qwik-city/src/global.css +0 -24
- package/starters/apps/qwik-city/src/root.tsx +0 -16
- package/starters/apps/qwik-city/src/routes/about-us/index.tsx +0 -17
- package/starters/apps/qwik-city/src/routes/api/[org]/[user].json/index.ts +0 -15
- package/starters/apps/qwik-city/src/routes/api/api.css +0 -14
- package/starters/apps/qwik-city/src/routes/api/data.json/index.ts +0 -9
- package/starters/apps/qwik-city/src/routes/api/index@api.tsx +0 -34
- package/starters/apps/qwik-city/src/routes/api/layout-api.tsx +0 -37
- package/starters/apps/qwik-city/src/routes/blog/[...slug]/index.tsx +0 -36
- package/starters/apps/qwik-city/src/routes/blog/index.md +0 -7
- package/starters/apps/qwik-city/src/routes/blog/layout.tsx +0 -21
- package/starters/apps/qwik-city/src/routes/dashboard/dashboard.css +0 -14
- package/starters/apps/qwik-city/src/routes/dashboard/index.tsx +0 -15
- package/starters/apps/qwik-city/src/routes/dashboard/layout!.tsx +0 -44
- package/starters/apps/qwik-city/src/routes/dashboard/profile/index.tsx +0 -15
- package/starters/apps/qwik-city/src/routes/dashboard/settings/index.tsx +0 -15
- package/starters/apps/qwik-city/src/routes/docs/[category]/[id]/index.tsx +0 -23
- package/starters/apps/qwik-city/src/routes/docs/docs.css +0 -10
- package/starters/apps/qwik-city/src/routes/docs/getting-started/index.md +0 -44
- package/starters/apps/qwik-city/src/routes/docs/index.tsx +0 -14
- package/starters/apps/qwik-city/src/routes/docs/layout!.tsx +0 -31
- package/starters/apps/qwik-city/src/routes/docs/menu.md +0 -11
- package/starters/apps/qwik-city/src/routes/docs/overview/index.md +0 -7
- package/starters/apps/qwik-city/src/routes/index.tsx +0 -16
- package/starters/apps/qwik-city/src/routes/products/[id]/index.tsx +0 -123
- package/starters/apps/qwik-city/vite.config.ts +0 -17
- package/starters/features/prettier/.prettierignore +0 -23
- package/starters/features/prettier/package.json +0 -10
- package/starters/features/react/package.json +0 -26
- package/starters/features/react/src/entry.ssr.tsx +0 -11
- package/starters/features/react/src/react/app.tsx +0 -14
- package/starters/features/tailwindcss/package.json +0 -8
- package/starters/features/tailwindcss/postcss.config.cjs +0 -6
- package/starters/features/tailwindcss/src/global.css +0 -3
- package/starters/features/tailwindcss/tailwind.config.cjs +0 -7
- package/starters/servers/cloudflare-pages/.node-version +0 -1
- package/starters/servers/cloudflare-pages/README.md +0 -17
- package/starters/servers/cloudflare-pages/functions/[[path]].ts +0 -5
- package/starters/servers/cloudflare-pages/package.json +0 -18
- package/starters/servers/cloudflare-pages/public/_headers +0 -2
- package/starters/servers/cloudflare-pages/src/entry.cloudflare.tsx +0 -4
- package/starters/servers/express/README.md +0 -9
- package/starters/servers/express/package.json +0 -11
- package/starters/servers/express/src/entry.express.tsx +0 -31
- package/starters/servers/netlify-edge/.node-version +0 -1
- package/starters/servers/netlify-edge/README.md +0 -39
- package/starters/servers/netlify-edge/netlify.toml +0 -10
- package/starters/servers/netlify-edge/package.json +0 -19
- package/starters/servers/netlify-edge/public/_headers +0 -2
- package/starters/servers/netlify-edge/src/entry.netlify.ts +0 -6
- package/starters/servers/netlify-edge/tsconfig.json +0 -17
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "Cloudflare Pages.",
|
|
3
|
-
"scripts": {
|
|
4
|
-
"build.ssr": "vite build --ssr src/entry.cloudflare.tsx",
|
|
5
|
-
"serve": "wrangler pages dev ./dist"
|
|
6
|
-
},
|
|
7
|
-
"devDependencies": {
|
|
8
|
-
"wrangler": "beta"
|
|
9
|
-
},
|
|
10
|
-
"__qwik__": {
|
|
11
|
-
"priority": -1,
|
|
12
|
-
"vite": {
|
|
13
|
-
"VITE_IMPORTS": "",
|
|
14
|
-
"VITE_CONFIG": "ssr: {target: 'webworker', noExternal: true},",
|
|
15
|
-
"VITE_PLUGINS": ""
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
## Express Server
|
|
2
|
-
|
|
3
|
-
This app has a minimal [Express server](https://expressjs.com/) implementation. After running a full build, you can preview the build using the command:
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
npm run serve
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Then visit [http://localhost:8080/](http://localhost:8080/)
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { qwikCity } from '@builder.io/qwik-city/middleware/express';
|
|
2
|
-
import express from 'express';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import { join } from 'path';
|
|
5
|
-
import render from './entry.ssr';
|
|
6
|
-
|
|
7
|
-
// directories where the static assets are located
|
|
8
|
-
const distDir = join(fileURLToPath(import.meta.url), '..', '..', 'dist');
|
|
9
|
-
const buildDir = join(distDir, 'build');
|
|
10
|
-
|
|
11
|
-
// create the Qwik City express middleware
|
|
12
|
-
const { router, notFound } = qwikCity(render);
|
|
13
|
-
|
|
14
|
-
// create the express server
|
|
15
|
-
const app = express();
|
|
16
|
-
|
|
17
|
-
// static asset handlers
|
|
18
|
-
app.use(`/build`, express.static(buildDir, { immutable: true, maxAge: '1y' }));
|
|
19
|
-
app.use(express.static(distDir, { redirect: false }));
|
|
20
|
-
|
|
21
|
-
// use Qwik City's page and endpoint handler
|
|
22
|
-
app.use(router);
|
|
23
|
-
|
|
24
|
-
// use Qwik City's 404 handler
|
|
25
|
-
app.use(notFound);
|
|
26
|
-
|
|
27
|
-
// start the express server
|
|
28
|
-
app.listen(8080, () => {
|
|
29
|
-
/* eslint-disable */
|
|
30
|
-
console.log(`http://localhost:8080/`);
|
|
31
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
16
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
## Netlify
|
|
2
|
-
|
|
3
|
-
This starter site is configured to deploy to [Netlify Edge Functions](https://www.netlify.com/products/edge/), which means it will be rendered at an edge location near to your users.
|
|
4
|
-
|
|
5
|
-
### Local development
|
|
6
|
-
|
|
7
|
-
The [Netlify CLI](https://docs.netlify.com/cli/get-started/) can be used to preview a production build locally. To do so: First build your site, then to start a local server, run:
|
|
8
|
-
|
|
9
|
-
1. install Netlify CLI globally `npm i -g netlify-cli`
|
|
10
|
-
2. Build your site both ssr and client `npm run build`.
|
|
11
|
-
3. Start a local server with `npm run serve`.
|
|
12
|
-
In this project, `npm run serve` uses the `netlify dev` command to spin up a server that can handle Netlify's Edge Functions locally.
|
|
13
|
-
4. Visit [http://localhost:8888/](http://localhost:8888/) to check out your site.
|
|
14
|
-
|
|
15
|
-
### Deployments
|
|
16
|
-
|
|
17
|
-
You can [deploy your site to Netlify](https://docs.netlify.com/site-deploys/create-deploys/) either via a Git provider integration or through the Netlify CLI. This starter site includes a `netlify.toml` file to configure your build for deployment.
|
|
18
|
-
|
|
19
|
-
#### Deploying via Git
|
|
20
|
-
|
|
21
|
-
Once your site has been pushed to your Git provider, you can either link it [in the Netlify UI](https://app.netlify.com/start) or use the CLI. To link your site to a Git provider from the Netlify CLI, run the command:
|
|
22
|
-
|
|
23
|
-
```shell
|
|
24
|
-
netlify link
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This sets up [continuous deployment](https://docs.netlify.com/site-deploys/create-deploys/#deploy-with-git) for your site's repo. Whenever you push new commits to your repo, Netlify starts the build process..
|
|
28
|
-
|
|
29
|
-
#### Deploying manually via the CLI
|
|
30
|
-
|
|
31
|
-
If you wish to deploy from the CLI rather than using Git, you can use the command:
|
|
32
|
-
|
|
33
|
-
```shell
|
|
34
|
-
netlify deploy --build
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
You must use the `--build` flag whenever you deploy. This ensures that the Edge Functions that this starter site relies on are generated and available when you deploy your site.
|
|
38
|
-
|
|
39
|
-
Add `--prod` flag to deploy to production.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "Netlify Edge Functions.",
|
|
3
|
-
"scripts": {
|
|
4
|
-
"serve": "netlify dev",
|
|
5
|
-
"build.ssr": "vite build --ssr src/entry.netlify.ts"
|
|
6
|
-
},
|
|
7
|
-
"devDependencies": {
|
|
8
|
-
"@netlify/vite-plugin-netlify-edge": "1.1.0"
|
|
9
|
-
},
|
|
10
|
-
"__qwik__": {
|
|
11
|
-
"priority": -1,
|
|
12
|
-
"vite": {
|
|
13
|
-
"VITE_IMPORTS": "import netlifyEdge from '@netlify/vite-plugin-netlify-edge';",
|
|
14
|
-
"VITE_CONFIG": "",
|
|
15
|
-
"VITE_QWIK": "{ ssr: { outDir: 'netlify/edge-functions/entry.netlify' } }",
|
|
16
|
-
"VITE_PLUGINS": "netlifyEdge({ functionName: 'entry.netlify' }),"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -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"]
|
|
15
|
-
},
|
|
16
|
-
"include": ["src"]
|
|
17
|
-
}
|