Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Add Qwik Example #197

Open
Sensational-Code wants to merge 14 commits into directus-labs:main
base: main
Choose a base branch
Loading
from Sensational-Code:add-qwik-example-blog
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
c8c50ac
Initial project
Sensational-Code Aug 3, 2023
1ebb9a5
Add Qwik specific README.md
Sensational-Code Aug 3, 2023
d816c3d
Add Qwik listing to main README.md
Sensational-Code Aug 3, 2023
742c21a
Minor cleanup
Sensational-Code Aug 3, 2023
d1040fc
Minor spacing changes
Sensational-Code Aug 3, 2023
86c03d6
Add 404 page
Sensational-Code Aug 3, 2023
712044d
Add routing to 404 when article not found
Sensational-Code Aug 3, 2023
ca9fa9b
Add defined image sizes to prevent layout shift
Sensational-Code Aug 3, 2023
0754b77
Convert inline components to component$
Sensational-Code Aug 3, 2023
4c7b82d
Make Notice component close button work
Sensational-Code Aug 3, 2023
550af22
Extract Signal value on state definition
Sensational-Code Aug 3, 2023
5a2e84d
Use routerLoader$ on Home page for readability
Sensational-Code Aug 3, 2023
cff2ffb
Fix spelling mistake for Qwik README.md link
Sensational-Code Aug 4, 2023
f71d7e7
Remove rogue space
Sensational-Code Aug 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ These examples are frontend only, you will still need a Directus instance runnin
| <img height="32" src="./shared/logo/nextjs.svg#gh-light-mode-only" /><img height="32" src="./shared/logo/nextjs-dark.svg#gh-dark-mode-only" /> | **[Next.js `v13`](https://github.com/vercel/next.js)** | [source](/nextjs) |
| <img height="28" src="./shared/logo/nuxtjs2.svg" /> | **[Nuxt.js `v2`](https://github.com/nuxt/nuxt.js)** | [source](/nuxtjs) |
| <img height="36" src="./shared/logo/nuxtjs.svg" /> | **[Nuxt.js `v3`](https://github.com/nuxt/nuxt.js)** | [source](/nuxt3) |
| <img height="36" src="./shared/logo/qwik.svg" /> | **[Qwik `v1`](https://github.com/BuilderIO/qwik)** | [source](/qwik) |
| <img height="40" src="./shared/logo/react.svg" /> | **[React `v17`](https://github.com/facebook/react)** | [source](/react) <sup>[1]</sup> |
| <img height="32" src="./shared/logo/remix.svg#gh-light-mode-only" /><img height="32" src="./shared/logo/remix-dark.svg#gh-dark-mode-only" /> | **[Remix `v1`](https://github.com/remix-run/remix)** | [source](/remix) |
| <img height="32" src="./shared/logo/svelte.svg" /> | **[Svelte `v3`](https://github.com/sveltejs/svelte)** | [source](/svelte) <sup>[1]</sup> |
Expand Down
1 change: 1 addition & 0 deletions qwik/.env.example
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUBLIC_QWIK_APP_DIRECTUS_URL=http://127.0.0.1:8055
38 changes: 38 additions & 0 deletions qwik/.eslintignore
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**/*.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
42 changes: 42 additions & 0 deletions qwik/.eslintrc.cjs
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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",
},
};
41 changes: 41 additions & 0 deletions qwik/.gitignore
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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
38 changes: 38 additions & 0 deletions qwik/.prettierignore
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**/*.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
45 changes: 45 additions & 0 deletions qwik/README.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Directus Qwik Example

This is a [Qwik](https://qwik.builder.io) project bootstrapped with [`npm create qwik@latest`](https://github.com/BuilderIO/qwik-create-cli-build).

[![Open in CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/directus/examples/tree/main/qwik)

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/directus/examples/tree/main/qwik)

Note: This example folder is a standalone frontend, which is why it will still need Directus running to work, the CodeSandbox and StackBlitz links only pull the example folder as is, you will still need Directus running somewhere to make it work, such as a [Cloud](https://directus.cloud/) instance, or self hosted.
## 📌 Prerequisites

You will need to have the provided [Directus project](../directus) running first before proceeding with this example.

## 🚀 Getting Started

1. Clone this repo.

2. Install dependencies for this example.

```shell
cd qwik
npm install
```

3. Create a `.env` file by copying the provided `.env.example` file.

4. Start the development server.

```shell
npm start
```

Your Directus Qwik example is now running at <http://localhost:5173>.

## 🔗 Links

### Directus

- [Official Site](https://directus.io)
- [Documentation](https://docs.directus.io)

### Qwik

- [Official Site](https://qwik.builder.io)
- [Documentation](https://qwik.builder.io/docs)
Loading

AltStyle によって変換されたページ (->オリジナル) /