-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description **What(what issue does this code solve/what feature does it add):** Add a qwik project where we can add API(s) and a frontend which will be used to review and deploy to AWS our docker containers for testing. **How(how does it solve it):** 1. Initialise a qwik project at `apps/www` ## Required Checklist: - [ ] I have added any necessary documentation and comments in my code (where appropriate) - [ ] I have added tests to make sure my code runs in all contexts ## Further comments
- Loading branch information
1 parent
41350ed
commit e68e101
Showing
31 changed files
with
10,244 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "qwik-project-name", | ||
"scripts": { | ||
"build": "qwik build", | ||
"build.client": "vite build", | ||
"build.preview": "vite build --ssr src/entry.preview.tsx", | ||
"build.types": "tsc --incremental --noEmit", | ||
"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", | ||
"start": "vite --open --mode ssr", | ||
"deploy": "echo 'Run \"npm run qwik add\" to install a server adapter'", | ||
"qwik": "qwik" | ||
}, | ||
"devDependencies": { | ||
"@builder.io/qwik": "^1.5.1", | ||
"@builder.io/qwik-city": "^1.5.1", | ||
"@types/eslint": "^8.56.5", | ||
"@types/node": "^20.11.24", | ||
"@typescript-eslint/eslint-plugin": "^7.1.0", | ||
"@typescript-eslint/parser": "^7.1.0", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-qwik": "^1.5.1", | ||
"prettier": "^3.2.5", | ||
"typescript": "5.3.3", | ||
"undici": "*", | ||
"vite": "^5.1.4", | ||
"vite-tsconfig-paths": "^4.2.1" | ||
}, | ||
"trustedDependencies": [ | ||
"sharp" | ||
], | ||
"trustedDependencies-annotation": "Needed for bun to allow running install scripts", | ||
"engines": { | ||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0", | ||
"npm": ">=10.0.0", | ||
"pnpm": ">=8.0.0", | ||
"yarn": ">=3.0.0" | ||
}, | ||
"engines-annotation": "Mostly required by sharp which needs a Node-API v9 compatible runtime", | ||
"private": true, | ||
"type": "module" | ||
} |
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,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 |
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,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": ["warn"], | ||
"@typescript-eslint/consistent-type-imports": "warn", | ||
"@typescript-eslint/no-unnecessary-condition": "warn", | ||
}, | ||
}; |
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,44 @@ | ||
# 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 | ||
|
||
# Vercel | ||
.vercel |
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,37 @@ | ||
**/*.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 |
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,3 @@ | ||
export default { | ||
plugins: ['prettier-plugin-tailwindcss'], | ||
} |
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,24 @@ | ||
{ | ||
// 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": ["<node_internals>/**"], | ||
"cwd": "${workspaceFolder}", | ||
"program": "${workspaceFolder}/node_modules/vite/bin/vite.js", | ||
"args": ["--mode", "ssr", "--force"] | ||
} | ||
] | ||
} |
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,36 @@ | ||
{ | ||
"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", | ||
"});", | ||
], | ||
}, | ||
} |
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,78 @@ | ||
{ | ||
"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</$2>", | ||
"});", | ||
], | ||
}, | ||
"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", | ||
" </${3}>", | ||
" );", | ||
"});", | ||
], | ||
}, | ||
"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", | ||
"});", | ||
"", | ||
], | ||
}, | ||
} |
Oops, something went wrong.