-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
7,606 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
|
||
dist/ | ||
public/ | ||
vite.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eof=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Add files here to ignore them from prettier formatting | ||
.nx/ | ||
dist/ | ||
coverage/ | ||
var/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"singleQuote": true, | ||
"arrowParens": "always", | ||
"bracketSameLine": false, | ||
"bracketSpacing": true, | ||
"editorconfig": true, | ||
"semi": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"quoteProps": "consistent", | ||
"proseWrap": "preserve", | ||
"htmlWhitespaceSensitivity": "css", | ||
"vueIndentScriptAndStyle": false, | ||
"embeddedLanguageFormatting": "auto", | ||
"singleAttributePerLine": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Rico Herwig | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
|
||
dist/ | ||
public/ | ||
vite.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Qwik City App ⚡️ | ||
|
||
- [Qwik Docs](https://qwik.builder.io/) | ||
- [Discord](https://qwik.builder.io/chat) | ||
- [Qwik GitHub](https://github.com/BuilderIO/qwik) | ||
- [@QwikDev](https://twitter.com/QwikDev) | ||
- [Vite](https://vitejs.dev/) | ||
|
||
--- | ||
|
||
## Project Structure | ||
|
||
This project is using Qwik with [QwikCity](https://qwik.builder.io/qwikcity/overview/). QwikCity is just a 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.builder.io/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 `pnpm qwik add` command to add additional integrations. Some examples of integrations include: Cloudflare, Netlify or Express server, and the [Static Site Generator (SSG)](https://qwik.builder.io/qwikcity/static-site-generation/static-site-config/). | ||
|
||
```shell | ||
pnpm qwik add # or `yarn qwik add` | ||
``` | ||
|
||
## Development | ||
|
||
Development mode uses [Vite's development server](https://vitejs.dev/). During development, the `dev` command will server-side render (SSR) the output. | ||
|
||
```shell | ||
npm start # or `yarn 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 locally preview a production build, and it should not be used as a production server. | ||
|
||
```shell | ||
pnpm preview # or `yarn preview` | ||
``` | ||
|
||
## Production | ||
|
||
The production build will generate client and server modules by running both client and server build commands. Additionally, the build command will use Typescript to run a type check on the source code. | ||
|
||
```shell | ||
pnpm build # or `yarn build` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import baseConfig from '../../eslint.config.js'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import { fileURLToPath } from 'url'; | ||
import path from 'path'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
}); | ||
|
||
export default [ | ||
...baseConfig, | ||
...compat.plugins('qwik'), | ||
...compat.extends('plugin:qwik/recommended'), | ||
{ | ||
files: ['*.ts', '*.tsx', '*.js', '*.jsx'], | ||
languageOptions: { | ||
parser: tsParser, | ||
parserOptions: { | ||
project: [ | ||
'./tsconfig.*?.json', | ||
], | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { join } = require('path'); | ||
|
||
module.exports = { | ||
plugins: { | ||
autoprefixer: {}, | ||
tailwindcss: { | ||
config: join(__dirname, 'tailwind.config.cjs'), | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"sourceRoot": "apps/website/src", | ||
"targets": { | ||
"build": { | ||
"executor": "qwik-nx:build", | ||
"options": { | ||
"runSequence": [ | ||
"website:build.client", | ||
"website:build.ssr" | ||
], | ||
"outputPath": "dist/apps/website" | ||
}, | ||
"configurations": { | ||
"preview": {} | ||
} | ||
}, | ||
"build.client": { | ||
"executor": "@nx/vite:build", | ||
"options": { | ||
"outputPath": "dist/apps/website", | ||
"configFile": "apps/website/vite.config.ts" | ||
} | ||
}, | ||
"build.ssr": { | ||
"executor": "@nx/vite:build", | ||
"defaultConfiguration": "preview", | ||
"options": { | ||
"outputPath": "dist/apps/website" | ||
}, | ||
"configurations": { | ||
"preview": { | ||
"ssr": "src/entry.preview.tsx", | ||
"mode": "production" | ||
} | ||
} | ||
}, | ||
"preview": { | ||
"executor": "@nx/vite:preview-server", | ||
"options": { | ||
"buildTarget": "website:build", | ||
"port": 4300 | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/vite:test", | ||
"outputs": [ | ||
"../../coverage/apps/website" | ||
], | ||
"options": { | ||
"passWithNoTests": true, | ||
"reportsDirectory": "../../coverage/apps/website" | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nx/vite:dev-server", | ||
"options": { | ||
"buildTarget": "website:build.client", | ||
"mode": "ssr", | ||
"port": 4200 | ||
} | ||
}, | ||
"serve.debug": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "node --inspect-brk ../../node_modules/vite/bin/vite.js --mode ssr --force", | ||
"cwd": "apps/website" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": [ | ||
"{options.outputFile}" | ||
], | ||
"options": { | ||
"lintFilePatterns": [ | ||
"apps/website/**/*.{ts,tsx,js,jsx}" | ||
] | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/web-manifest-combined.json", | ||
"name": "qwik-project-name", | ||
"short_name": "Welcome to Qwik", | ||
"start_url": ".", | ||
"display": "standalone", | ||
"background_color": "#fff", | ||
"description": "A Qwik project app." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User-agent: * | ||
Disallow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
header { | ||
display: flex; | ||
background: white; | ||
border-bottom: 10px solid var(--qwik-dark-purple); | ||
} | ||
|
||
header .logo a { | ||
display: inline-block; | ||
padding: 10px 10px 7px 20px; | ||
} | ||
|
||
header ul { | ||
margin: 0; | ||
padding: 3px 10px 0 0; | ||
list-style: none; | ||
flex: 1; | ||
text-align: right; | ||
} | ||
|
||
header li { | ||
display: inline-block; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
header li a { | ||
display: inline-block; | ||
padding: 15px 10px; | ||
text-decoration: none; | ||
} | ||
|
||
header li a:hover { | ||
text-decoration: underline; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { component$, useStylesScoped$ } from '@builder.io/qwik'; | ||
import { QwikLogo } from '../icons/qwik'; | ||
import styles from './header.scss?inline'; | ||
|
||
export default component$(() => { | ||
useStylesScoped$(styles); | ||
|
||
return ( | ||
<header> | ||
<div class="logo"> | ||
<a href="https://qwik.builder.io/" target="_blank"> | ||
<QwikLogo /> | ||
</a> | ||
</div> | ||
<ul> | ||
<li> | ||
<a | ||
href="https://qwik.builder.io/docs/components/overview/" | ||
target="_blank" | ||
> | ||
Docs | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://qwik.builder.io/examples/introduction/hello-world/" | ||
target="_blank" | ||
> | ||
Examples | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://qwik.builder.io/tutorial/welcome/overview/" | ||
target="_blank" | ||
> | ||
Tutorials | ||
</a> | ||
</li> | ||
</ul> | ||
</header> | ||
); | ||
}); |
Oops, something went wrong.