diff --git a/apps/docs/.eslintignore b/apps/docs/.eslintignore deleted file mode 100644 index 1acecc10..00000000 --- a/apps/docs/.eslintignore +++ /dev/null @@ -1,38 +0,0 @@ -**/*.log -**/.DS_Store -*. -.vscode/settings.json -.history -.yarn -bazel-* -bazel-bin -bazel-out -bazel-qwik -bazel-testlogs -dist -dist-dev -lib -lib-types -etc -external -node_modules -temp -tsc-out -tsdoc-metadata.json -target -output -rollup.config.js -build -.cache -.vscode -.rollup.cache -dist -tsconfig.tsbuildinfo -vite.config.ts -*.spec.tsx -*.spec.ts -.netlify -pnpm-lock.yaml -package-lock.json -yarn.lock -server diff --git a/apps/docs/.eslintrc.cjs b/apps/docs/.eslintrc.cjs deleted file mode 100644 index 70dc5d03..00000000 --- a/apps/docs/.eslintrc.cjs +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - es2021: true, - node: true, - }, - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:qwik/recommended", - ], - parser: "@typescript-eslint/parser", - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.json"], - ecmaVersion: 2021, - sourceType: "module", - ecmaFeatures: { - jsx: true, - }, - }, - plugins: ["@typescript-eslint"], - rules: { - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/ban-ts-comment": "off", - "prefer-spread": "off", - "no-case-declarations": "off", - "no-console": "off", - "@typescript-eslint/no-unused-vars": ["error"], - "@typescript-eslint/consistent-type-imports": "warn", - "@typescript-eslint/no-unnecessary-condition": "warn", - }, -}; diff --git a/apps/docs/.eslintrc.js b/apps/docs/.eslintrc.js deleted file mode 100644 index 878c3386..00000000 --- a/apps/docs/.eslintrc.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - root: true, - extends: [ - "@nestri/eslint-config/qwik.js", - ], - parser: "@typescript-eslint/parser", - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.json"], - ecmaVersion: 2021, - sourceType: "module", - ecmaFeatures: { - jsx: true, - }, - } -}; \ No newline at end of file diff --git a/apps/docs/.gitignore b/apps/docs/.gitignore deleted file mode 100644 index c0eb215e..00000000 --- a/apps/docs/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Build -/dist -/lib -/lib-types -/server - -# Development -node_modules -*.local - -# Cache -.cache -.mf -.rollup.cache -tsconfig.tsbuildinfo - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -# Editor -.vscode/* -!.vscode/launch.json -!.vscode/*.code-snippets - -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? - -# Yarn -.yarn/* -!.yarn/releases - -# Cloudflare -functions/**/*.js diff --git a/apps/docs/.prettierignore b/apps/docs/.prettierignore deleted file mode 100644 index b62a9681..00000000 --- a/apps/docs/.prettierignore +++ /dev/null @@ -1,37 +0,0 @@ -**/*.log -**/.DS_Store -*. -.vscode/settings.json -.history -.yarn -bazel-* -bazel-bin -bazel-out -bazel-qwik -bazel-testlogs -dist -dist-dev -lib -lib-types -etc -external -node_modules -temp -tsc-out -tsdoc-metadata.json -target -output -rollup.config.js -build -.cache -.vscode -.rollup.cache -tsconfig.tsbuildinfo -vite.config.ts -*.spec.tsx -*.spec.ts -.netlify -pnpm-lock.yaml -package-lock.json -yarn.lock -server diff --git a/apps/docs/.vscode/launch.json b/apps/docs/.vscode/launch.json deleted file mode 100644 index e684cc84..00000000 --- a/apps/docs/.vscode/launch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch Chrome", - "request": "launch", - "type": "chrome", - "url": "http://localhost:5173", - "webRoot": "${workspaceFolder}" - }, - { - "type": "node", - "name": "dev.debug", - "request": "launch", - "skipFiles": ["/**"], - "cwd": "${workspaceFolder}", - "program": "${workspaceFolder}/node_modules/vite/bin/vite.js", - "args": ["--mode", "ssr", "--force"] - } - ] -} diff --git a/apps/docs/.vscode/qwik-city.code-snippets b/apps/docs/.vscode/qwik-city.code-snippets deleted file mode 100644 index 878fcf68..00000000 --- a/apps/docs/.vscode/qwik-city.code-snippets +++ /dev/null @@ -1,36 +0,0 @@ -{ - "onRequest": { - "scope": "javascriptreact,typescriptreact", - "prefix": "qonRequest", - "description": "onRequest function for a route index", - "body": [ - "export const onRequest: RequestHandler = (request) => {", - " $0", - "};", - ], - }, - "loader$": { - "scope": "javascriptreact,typescriptreact", - "prefix": "qloader$", - "description": "loader$()", - "body": ["export const $1 = routeLoader$(() => {", " $0", "});"], - }, - "action$": { - "scope": "javascriptreact,typescriptreact", - "prefix": "qaction$", - "description": "action$()", - "body": ["export const $1 = routeAction$((data) => {", " $0", "});"], - }, - "Full Page": { - "scope": "javascriptreact,typescriptreact", - "prefix": "qpage", - "description": "Simple page component", - "body": [ - "import { component$ } from '@builder.io/qwik';", - "", - "export default component$(() => {", - " $0", - "});", - ], - }, -} diff --git a/apps/docs/.vscode/qwik.code-snippets b/apps/docs/.vscode/qwik.code-snippets deleted file mode 100644 index 62edc825..00000000 --- a/apps/docs/.vscode/qwik.code-snippets +++ /dev/null @@ -1,78 +0,0 @@ -{ - "Qwik component (simple)": { - "scope": "javascriptreact,typescriptreact", - "prefix": "qcomponent$", - "description": "Simple Qwik component", - "body": [ - "export const ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}} = component$(() => {", - " return <${2:div}>$4", - "});", - ], - }, - "Qwik component (props)": { - "scope": "typescriptreact", - "prefix": "qcomponent$ + props", - "description": "Qwik component w/ props", - "body": [ - "export interface ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}}Props {", - " $2", - "}", - "", - "export const $1 = component$<$1Props>((props) => {", - " const ${2:count} = useSignal(0);", - " return (", - " <${3:div} on${4:Click}$={(ev) => {$5}}>", - " $6", - " ", - " );", - "});", - ], - }, - "Qwik signal": { - "scope": "javascriptreact,typescriptreact", - "prefix": "quseSignal", - "description": "useSignal() declaration", - "body": ["const ${1:foo} = useSignal($2);", "$0"], - }, - "Qwik store": { - "scope": "javascriptreact,typescriptreact", - "prefix": "quseStore", - "description": "useStore() declaration", - "body": ["const ${1:state} = useStore({", " $2", "});", "$0"], - }, - "$ hook": { - "scope": "javascriptreact,typescriptreact", - "prefix": "q$", - "description": "$() function hook", - "body": ["$(() => {", " $0", "});", ""], - }, - "useVisibleTask": { - "scope": "javascriptreact,typescriptreact", - "prefix": "quseVisibleTask", - "description": "useVisibleTask$() function hook", - "body": ["useVisibleTask$(({ track }) => {", " $0", "});", ""], - }, - "useTask": { - "scope": "javascriptreact,typescriptreact", - "prefix": "quseTask$", - "description": "useTask$() function hook", - "body": [ - "useTask$(({ track }) => {", - " track(() => $1);", - " $0", - "});", - "", - ], - }, - "useResource": { - "scope": "javascriptreact,typescriptreact", - "prefix": "quseResource$", - "description": "useResource$() declaration", - "body": [ - "const $1 = useResource$(({ track, cleanup }) => {", - " $0", - "});", - "", - ], - }, -} diff --git a/apps/docs/README.md b/apps/docs/README.md deleted file mode 100644 index 385e914d..00000000 --- a/apps/docs/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# Qwik City App ⚡️ - -- [Qwik Docs](https://qwik.dev/) -- [Discord](https://qwik.dev/chat) -- [Qwik GitHub](https://github.com/QwikDev/qwik) -- [@QwikDev](https://twitter.com/QwikDev) -- [Vite](https://vitejs.dev/) - ---- - -## Project Structure - -This project is using Qwik with [QwikCity](https://qwik.dev/qwikcity/overview/). QwikCity is just an extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more. - -Inside your project, you'll see the following directory structure: - -``` -├── public/ -│ └── ... -└── src/ - ├── components/ - │ └── ... - └── routes/ - └── ... -``` - -- `src/routes`: Provides the directory-based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.dev/qwikcity/routing/overview/) for more info. - -- `src/components`: Recommended directory for components. - -- `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. - -## Add Integrations and deployment - -Use the `bun qwik add` command to add additional integrations. Some examples of integrations includes: Cloudflare, Netlify or Express Server, and the [Static Site Generator (SSG)](https://qwik.dev/qwikcity/guides/static-site-generation/). - -```shell -bun qwik add # or `bun qwik add` -``` - -## Development - -Development mode uses [Vite's development server](https://vitejs.dev/). The `dev` command will server-side render (SSR) the output during development. - -```shell -npm start # or `bun start` -``` - -> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build. - -## Preview - -The preview command will create a production build of the client modules, a production build of `src/entry.preview.tsx`, and run a local server. The preview server is only for convenience to preview a production build locally and should not be used as a production server. - -```shell -bun preview # or `bun preview` -``` - -## Production - -The production build will generate client and server modules by running both client and server build commands. The build command will use Typescript to run a type check on the source code. - -```shell -bun build # or `bun build` -``` - -## Cloudflare Pages - -Cloudflare's [wrangler](https://github.com/cloudflare/wrangler) CLI can be used to preview a production build locally. To start a local server, run: - -``` -bun serve -``` - -Then visit [http://localhost:8787/](http://localhost:8787/) - -### Deployments - -[Cloudflare Pages](https://pages.cloudflare.com/) are deployable through their [Git provider integrations](https://developers.cloudflare.com/pages/platform/git-integration/). - -If you don't already have an account, then [create a Cloudflare account here](https://dash.cloudflare.com/sign-up/pages). Next go to your dashboard and follow the [Cloudflare Pages deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-anything/). - -Within the projects "Settings" for "Build and deployments", the "Build command" should be `bun build`, and the "Build output directory" should be set to `dist`. - -### Function Invocation Routes - -Cloudflare Page's [function-invocation-routes config](https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes) can be used to include, or exclude, certain paths to be used by the worker functions. Having a `_routes.json` file gives developers more granular control over when your Function is invoked. -This is useful to determine if a page response should be Server-Side Rendered (SSR) or if the response should use a static-site generated (SSG) `index.html` file. - -By default, the Cloudflare pages adaptor _does not_ include a `public/_routes.json` config, but rather it is auto-generated from the build by the Cloudflare adaptor. An example of an auto-generate `dist/_routes.json` would be: - -``` -{ - "include": [ - "/*" - ], - "exclude": [ - "/_headers", - "/_redirects", - "/build/*", - "/favicon.ico", - "/manifest.json", - "/service-worker.js", - "/about" - ], - "version": 1 -} -``` - -In the above example, it's saying _all_ pages should be SSR'd. However, the root static files such as `/favicon.ico` and any static assets in `/build/*` should be excluded from the Functions, and instead treated as a static file. - -In most cases the generated `dist/_routes.json` file is ideal. However, if you need more granular control over each path, you can instead provide you're own `public/_routes.json` file. When the project provides its own `public/_routes.json` file, then the Cloudflare adaptor will not auto-generate the routes config and instead use the committed one within the `public` directory. diff --git a/apps/docs/adapters/cloudflare-pages/vite.config.ts b/apps/docs/adapters/cloudflare-pages/vite.config.ts deleted file mode 100644 index 56cd3d92..00000000 --- a/apps/docs/adapters/cloudflare-pages/vite.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { cloudflarePagesAdapter } from "@builder.io/qwik-city/adapters/cloudflare-pages/vite"; -import { extendConfig } from "@builder.io/qwik-city/vite"; -import baseConfig from "../../vite.config"; - -export default extendConfig(baseConfig, () => { - return { - build: { - ssr: true, - rollupOptions: { - input: ["src/entry.cloudflare-pages.tsx", "@qwik-city-plan"], - }, - }, - plugins: [cloudflarePagesAdapter()], - }; -}); diff --git a/apps/docs/package.json b/apps/docs/package.json deleted file mode 100644 index 2b08ccc9..00000000 --- a/apps/docs/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@nestri/docs", - "description": "Your games. Your rules.", - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "engines-annotation": "Mostly required by sharp which needs a Node-API v9 compatible runtime", - "private": true, - "trustedDependencies": [ - "sharp" - ], - "trustedDependencies-annotation": "Needed for bun to allow running install scripts", - "type": "module", - "scripts": { - "build": "qwik build", - "build.client": "vite build", - "build.preview": "vite build --ssr src/entry.preview.tsx", - "build.server": "vite build -c adapters/cloudflare-pages/vite.config.ts", - "build.types": "tsc --incremental --noEmit", - "deploy": "wrangler pages deploy ./dist", - "dev": "vite --mode ssr", - "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force", - "fmt": "prettier --write .", - "fmt.check": "prettier --check .", - "lint": "eslint \"src/**/*.ts*\"", - "preview": "qwik build preview && vite preview --open", - "serve": "wrangler pages dev ./dist --compatibility-flags=nodejs_als", - "start": "vite --open --mode ssr", - "qwik": "qwik" - }, - "devDependencies": { - "@builder.io/qwik": "^1.8.0", - "@builder.io/qwik-city": "^1.8.0", - "@nestri/eslint-config": "*", - "@nestri/typescript-config": "*", - "@nestri/ui": "*", - "@types/eslint": "8.56.10", - "@types/node": "20.14.11", - "@typescript-eslint/eslint-plugin": "7.16.1", - "@typescript-eslint/parser": "7.16.1", - "eslint": "8.57.0", - "eslint-plugin-qwik": "^1.8.0", - "prettier": "3.3.3", - "typescript": "5.4.5", - "undici": "*", - "vite": "5.3.5", - "vite-tsconfig-paths": "^4.2.1", - "wrangler": "^3.0.0" - } -} diff --git a/apps/docs/postcss.config.cjs b/apps/docs/postcss.config.cjs deleted file mode 100644 index dd1d0abe..00000000 --- a/apps/docs/postcss.config.cjs +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("@nestri/ui/postcss.config"); \ No newline at end of file diff --git a/apps/docs/public/_headers b/apps/docs/public/_headers deleted file mode 100644 index 76367924..00000000 --- a/apps/docs/public/_headers +++ /dev/null @@ -1,9 +0,0 @@ -# https://developers.cloudflare.com/pages/platform/headers/ - -/*service-worker.js - Cache-Control: no-store - Content-Type: application/javascript - X-Content-Type-Options: nosniff - -/build/* - Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable diff --git a/apps/docs/public/_redirects b/apps/docs/public/_redirects deleted file mode 100644 index e2746108..00000000 --- a/apps/docs/public/_redirects +++ /dev/null @@ -1 +0,0 @@ -# https://developers.cloudflare.com/pages/platform/redirects/ diff --git a/apps/docs/public/favicon.ico b/apps/docs/public/favicon.ico deleted file mode 100644 index a907041f..00000000 Binary files a/apps/docs/public/favicon.ico and /dev/null differ diff --git a/apps/docs/public/favicon.svg b/apps/docs/public/favicon.svg deleted file mode 100644 index 736b34cb..00000000 --- a/apps/docs/public/favicon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/apps/docs/public/logo.webp b/apps/docs/public/logo.webp deleted file mode 100644 index 65df71a6..00000000 Binary files a/apps/docs/public/logo.webp and /dev/null differ diff --git a/apps/docs/public/manifest.json b/apps/docs/public/manifest.json deleted file mode 100644 index cc3871b6..00000000 --- a/apps/docs/public/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/web-manifest-combined.json", - "name": "Nestri", - "short_name": "Nestri - Your games. Your rules.", - "start_url": ".", - "display": "standalone", - "background_color": "#fafafa", - "description": "Nestri - Your games. Your rules.", - "icons": [ - { - "src": "/seo/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/seo/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#fafafa" -} \ No newline at end of file diff --git a/apps/docs/public/seo/android-chrome-192x192.png b/apps/docs/public/seo/android-chrome-192x192.png deleted file mode 100644 index 28422101..00000000 Binary files a/apps/docs/public/seo/android-chrome-192x192.png and /dev/null differ diff --git a/apps/docs/public/seo/android-chrome-512x512.png b/apps/docs/public/seo/android-chrome-512x512.png deleted file mode 100644 index 6b046664..00000000 Binary files a/apps/docs/public/seo/android-chrome-512x512.png and /dev/null differ diff --git a/apps/docs/public/seo/apple-touch-icon.png b/apps/docs/public/seo/apple-touch-icon.png deleted file mode 100644 index f9de3316..00000000 Binary files a/apps/docs/public/seo/apple-touch-icon.png and /dev/null differ diff --git a/apps/docs/public/seo/banner.png b/apps/docs/public/seo/banner.png deleted file mode 100644 index 3d33ebbe..00000000 Binary files a/apps/docs/public/seo/banner.png and /dev/null differ diff --git a/apps/docs/public/seo/browserconfig.xml b/apps/docs/public/seo/browserconfig.xml deleted file mode 100644 index 7c714d03..00000000 --- a/apps/docs/public/seo/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #ffede5 - - - diff --git a/apps/docs/public/seo/favicon-16x16.png b/apps/docs/public/seo/favicon-16x16.png deleted file mode 100644 index 9f22bfef..00000000 Binary files a/apps/docs/public/seo/favicon-16x16.png and /dev/null differ diff --git a/apps/docs/public/seo/favicon-32x32.png b/apps/docs/public/seo/favicon-32x32.png deleted file mode 100644 index 79e1cce5..00000000 Binary files a/apps/docs/public/seo/favicon-32x32.png and /dev/null differ diff --git a/apps/docs/public/seo/favicon.ico b/apps/docs/public/seo/favicon.ico deleted file mode 100644 index 66491241..00000000 Binary files a/apps/docs/public/seo/favicon.ico and /dev/null differ diff --git a/apps/docs/public/seo/mstile-150x150.png b/apps/docs/public/seo/mstile-150x150.png deleted file mode 100644 index 13f0df9d..00000000 Binary files a/apps/docs/public/seo/mstile-150x150.png and /dev/null differ diff --git a/apps/docs/public/seo/safari-pinned-tab.svg b/apps/docs/public/seo/safari-pinned-tab.svg deleted file mode 100644 index 0090cd78..00000000 --- a/apps/docs/public/seo/safari-pinned-tab.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - - - diff --git a/apps/docs/public/seo/site.webmanifest b/apps/docs/public/seo/site.webmanifest deleted file mode 100644 index 4853690e..00000000 --- a/apps/docs/public/seo/site.webmanifest +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Nestri", - "short_name": "Nestri", - "icons": [ - { - "src": "/icons/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/icons/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#fafafa", - "background_color": "#fafafa", - "display": "standalone"} diff --git a/apps/docs/qwik.env.d.ts b/apps/docs/qwik.env.d.ts deleted file mode 100644 index 25af92b9..00000000 --- a/apps/docs/qwik.env.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file can be used to add references for global types like `vite/client`. - -// Add global `vite/client` types. For more info, see: https://vitejs.dev/guide/features#client-types -/// diff --git a/apps/docs/src/entry.cloudflare-pages.tsx b/apps/docs/src/entry.cloudflare-pages.tsx deleted file mode 100644 index 510a6309..00000000 --- a/apps/docs/src/entry.cloudflare-pages.tsx +++ /dev/null @@ -1,24 +0,0 @@ -/* - * WHAT IS THIS FILE? - * - * It's the entry point for Cloudflare Pages when building for production. - * - * Learn more about the Cloudflare Pages integration here: - * - https://qwik.dev/docs/deployments/cloudflare-pages/ - * - */ -import { - createQwikCity, - type PlatformCloudflarePages, -} from "@builder.io/qwik-city/middleware/cloudflare-pages"; -import qwikCityPlan from "@qwik-city-plan"; -import { manifest } from "@qwik-client-manifest"; -import render from "./entry.ssr"; - -declare global { - interface QwikCityPlatform extends PlatformCloudflarePages {} -} - -const fetch = createQwikCity({ render, qwikCityPlan, manifest }); - -export { fetch }; diff --git a/apps/docs/src/entry.dev.tsx b/apps/docs/src/entry.dev.tsx deleted file mode 100644 index f421db70..00000000 --- a/apps/docs/src/entry.dev.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/* - * WHAT IS THIS FILE? - * - * Development entry point using only client-side modules: - * - Do not use this mode in production! - * - No SSR - * - No portion of the application is pre-rendered on the server. - * - All of the application is running eagerly in the browser. - * - More code is transferred to the browser than in SSR mode. - * - Optimizer/Serialization/Deserialization code is not exercised! - */ -import { render, type RenderOptions } from "@builder.io/qwik"; -import Root from "./root"; - -export default function (opts: RenderOptions) { - return render(document, , opts); -} diff --git a/apps/docs/src/entry.preview.tsx b/apps/docs/src/entry.preview.tsx deleted file mode 100644 index ef0111a8..00000000 --- a/apps/docs/src/entry.preview.tsx +++ /dev/null @@ -1,21 +0,0 @@ -/* - * WHAT IS THIS FILE? - * - * It's the bundle entry point for `npm run preview`. - * That is, serving your app built in production mode. - * - * Feel free to modify this file, but don't remove it! - * - * Learn more about Vite's preview command: - * - https://vitejs.dev/config/preview-options.html#preview-options - * - */ -import { createQwikCity } from "@builder.io/qwik-city/middleware/node"; -import qwikCityPlan from "@qwik-city-plan"; -// make sure qwikCityPlan is imported before entry -import render from "./entry.ssr"; - -/** - * The default export is the QwikCity adapter used by Vite preview. - */ -export default createQwikCity({ render, qwikCityPlan }); diff --git a/apps/docs/src/entry.ssr.tsx b/apps/docs/src/entry.ssr.tsx deleted file mode 100644 index e3de5013..00000000 --- a/apps/docs/src/entry.ssr.tsx +++ /dev/null @@ -1,33 +0,0 @@ -/** - * WHAT IS THIS FILE? - * - * SSR entry point, in all cases the application is rendered outside the browser, this - * entry point will be the common one. - * - * - Server (express, cloudflare...) - * - npm run start - * - npm run preview - * - npm run build - * - */ -import { - renderToStream, - type RenderToStreamOptions, -} from "@builder.io/qwik/server"; -import { manifest } from "@qwik-client-manifest"; -import Root from "./root"; - -export default function (opts: RenderToStreamOptions) { - return renderToStream(, { - manifest, - ...opts, - // Use container attributes to set attributes on the html tag. - containerAttributes: { - lang: "en-us", - ...opts.containerAttributes, - }, - serverData: { - ...opts.serverData, - }, - }); -} diff --git a/apps/docs/src/global.css b/apps/docs/src/global.css deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/docs/src/root.tsx b/apps/docs/src/root.tsx deleted file mode 100644 index 2626cab3..00000000 --- a/apps/docs/src/root.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { component$ } from "@builder.io/qwik"; -import { - QwikCityProvider, - RouterOutlet, - ServiceWorkerRegister, -} from "@builder.io/qwik-city"; -import { RouterHead } from "@nestri/ui"; -import { isDev } from "@builder.io/qwik/build"; - -import "@nestri/ui/globals.css"; -import { Fonts } from "@nestri/ui"; - -export default component$(() => { - /** - * The root of a QwikCity site always start with the component, - * immediately followed by the document's and . - * - * Don't remove the `` and `` elements. - */ - - return ( - - - - - - - {!isDev && ( - - )} - - - - - {!isDev && } - - - - ); -}); diff --git a/apps/docs/src/routes/index.tsx b/apps/docs/src/routes/index.tsx deleted file mode 100644 index 4fb7a52a..00000000 --- a/apps/docs/src/routes/index.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { component$ } from "@builder.io/qwik"; -import type { DocumentHead } from "@builder.io/qwik-city"; - -export default component$(() => { - return ( - <> -

Hi 👋

-
- Can't wait to see what you build with qwik! -
- Happy coding. -
- - ); -}); - -export const head: DocumentHead = { - title: "Welcome to Qwik", - meta: [ - { - name: "description", - content: "Qwik site description", - }, - ], -}; diff --git a/apps/docs/src/routes/layout.tsx b/apps/docs/src/routes/layout.tsx deleted file mode 100644 index f799e429..00000000 --- a/apps/docs/src/routes/layout.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { component$, Slot } from "@builder.io/qwik"; -import type { RequestHandler } from "@builder.io/qwik-city"; - -export const onGet: RequestHandler = async ({ cacheControl }) => { - // Control caching for this request for best performance and to reduce hosting costs: - // https://qwik.dev/docs/caching/ - cacheControl({ - // Always serve a cached response by default, up to a week stale - staleWhileRevalidate: 60 * 60 * 24 * 7, - // Max once every 5 seconds, revalidate on the server to get a fresh version of this page - maxAge: 5, - }); -}; - -export default component$(() => { - return ; -}); diff --git a/apps/docs/src/routes/service-worker.ts b/apps/docs/src/routes/service-worker.ts deleted file mode 100644 index a10ab364..00000000 --- a/apps/docs/src/routes/service-worker.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * WHAT IS THIS FILE? - * - * The service-worker.ts file is used to have state of the art prefetching. - * https://qwik.dev/qwikcity/prefetching/overview/ - * - * Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline. - * You can also use this file to add more functionality that runs in the service worker. - */ -import { setupServiceWorker } from "@builder.io/qwik-city/service-worker"; - -setupServiceWorker(); - -addEventListener("install", () => self.skipWaiting()); - -addEventListener("activate", () => self.clients.claim()); - -declare const self: ServiceWorkerGlobalScope; diff --git a/apps/docs/src/routes/test/index.mdx b/apps/docs/src/routes/test/index.mdx deleted file mode 100644 index 541e51a4..00000000 --- a/apps/docs/src/routes/test/index.mdx +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Hello World Title ---- - -# Hello World Title - -This is a simple hello world component. \ No newline at end of file diff --git a/apps/docs/tailwind.config.js b/apps/docs/tailwind.config.js deleted file mode 100644 index e9547628..00000000 --- a/apps/docs/tailwind.config.js +++ /dev/null @@ -1,12 +0,0 @@ -// import colors from "tailwindcss/colors"; -import baseConfig from "@nestri/ui/tailwind.config"; -/** @type {import('tailwindcss').Config} */ -module.exports = { - - content: [ - "./{src,components,app}/**/*.{ts,tsx,html}", - "../../packages/ui/src/**/*.{ts,tsx}", - ], - presets: [baseConfig], - plugins: [], -}; \ No newline at end of file diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json deleted file mode 100644 index 3d803260..00000000 --- a/apps/docs/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": "@nestri/typescript-config/base.json", - "compilerOptions": { - "allowJs": true, - "target": "ES2017", - "module": "ES2022", - "lib": ["es2022", "DOM", "WebWorker", "DOM.Iterable"], - "jsx": "react-jsx", - "jsxImportSource": "@builder.io/qwik", - "strict": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "Bundler", - "esModuleInterop": true, - "skipLibCheck": true, - "incremental": true, - "isolatedModules": true, - "outDir": "tmp", - "noEmit": true, - "paths": { - "@/*": [ - "./src/*" - ] - } - }, - "files": [ - ".eslintrc.js" - ], - "include": [ - "src", - "./*.d.ts", - "./*.config.ts", - "./*.config.js", - "./*.config.cjs" - ] -} \ No newline at end of file diff --git a/apps/docs/vite.config.ts b/apps/docs/vite.config.ts deleted file mode 100644 index bd9b3f7f..00000000 --- a/apps/docs/vite.config.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * This is the base config for vite. - * When building, the adapter config is used which loads this file and extends it. - */ -import { defineConfig, type UserConfig } from "vite"; -import { qwikVite } from "@builder.io/qwik/optimizer"; -import { qwikCity } from "@builder.io/qwik-city/vite"; -import tsconfigPaths from "vite-tsconfig-paths"; -import pkg from "./package.json"; - -type PkgDep = Record; -const { dependencies = {}, devDependencies = {} } = pkg as any as { - dependencies: PkgDep; - devDependencies: PkgDep; - [key: string]: unknown; -}; -errorOnDuplicatesPkgDeps(devDependencies, dependencies); - -/** - * Note that Vite normally starts from `index.html` but the qwikCity plugin makes start at `src/entry.ssr.tsx` instead. - */ -export default defineConfig(({ command, mode }): UserConfig => { - return { - plugins: [qwikCity(), qwikVite(), tsconfigPaths()], - // This tells Vite which dependencies to pre-build in dev mode. - optimizeDeps: { - // Put problematic deps that break bundling here, mostly those with binaries. - // For example ['better-sqlite3'] if you use that in server functions. - exclude: [], - }, - - /** - * This is an advanced setting. It improves the bundling of your server code. To use it, make sure you understand when your consumed packages are dependencies or dev dependencies. (otherwise things will break in production) - */ - // ssr: - // command === "build" && mode === "production" - // ? { - // // All dev dependencies should be bundled in the server build - // noExternal: Object.keys(devDependencies), - // // Anything marked as a dependency will not be bundled - // // These should only be production binary deps (including deps of deps), CLI deps, and their module graph - // // If a dep-of-dep needs to be external, add it here - // // For example, if something uses `bcrypt` but you don't have it as a dep, you can write - // // external: [...Object.keys(dependencies), 'bcrypt'] - // external: Object.keys(dependencies), - // } - // : undefined, - - server: { - headers: { - // Don't cache the server response in dev mode - "Cache-Control": "public, max-age=0", - }, - }, - preview: { - headers: { - // Do cache the server response in preview (non-adapter production build) - "Cache-Control": "public, max-age=600", - }, - }, - }; -}); - -// *** utils *** - -/** - * Function to identify duplicate dependencies and throw an error - * @param {Object} devDependencies - List of development dependencies - * @param {Object} dependencies - List of production dependencies - */ -function errorOnDuplicatesPkgDeps( - devDependencies: PkgDep, - dependencies: PkgDep, -) { - let msg = ""; - // Create an array 'duplicateDeps' by filtering devDependencies. - // If a dependency also exists in dependencies, it is considered a duplicate. - const duplicateDeps = Object.keys(devDependencies).filter( - (dep) => dependencies[dep], - ); - - // include any known qwik packages - const qwikPkg = Object.keys(dependencies).filter((value) => - /qwik/i.test(value), - ); - - // any errors for missing "qwik-city-plan" - // [PLUGIN_ERROR]: Invalid module "@qwik-city-plan" is not a valid package - msg = `Move qwik packages ${qwikPkg.join(", ")} to devDependencies`; - - if (qwikPkg.length > 0) { - throw new Error(msg); - } - - // Format the error message with the duplicates list. - // The `join` function is used to represent the elements of the 'duplicateDeps' array as a comma-separated string. - msg = ` - Warning: The dependency "${duplicateDeps.join(", ")}" is listed in both "devDependencies" and "dependencies". - Please move the duplicated dependencies to "devDependencies" only and remove it from "dependencies" - `; - - // Throw an error with the constructed message. - if (duplicateDeps.length > 0) { - throw new Error(msg); - } -}