-
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
25 changed files
with
3,222 additions
and
96 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,31 @@ | ||
**/*.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 |
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,40 @@ | ||
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'], | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,104 +1,38 @@ | ||
# Build | ||
/dist | ||
/lib | ||
/lib-types | ||
/server | ||
|
||
# Development | ||
node_modules | ||
|
||
# Cache | ||
.cache | ||
.mf | ||
.vscode | ||
.rollup.cache | ||
tsconfig.tsbuildinfo | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
# Editor | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# Yarn | ||
.yarn/* | ||
!.yarn/releases |
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,6 @@ | ||
# Files Prettier should not format | ||
**/*.log | ||
**/.DS_Store | ||
*. | ||
dist | ||
node_modules |
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,66 @@ | ||
# Qwik 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/) | ||
- [Partytown](https://partytown.builder.io/) | ||
- [Mitosis](https://github.com/BuilderIO/mitosis) | ||
- [Builder.io](https://www.builder.io/) | ||
|
||
--- | ||
|
||
## Project Structure | ||
|
||
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 | ||
|
||
Use the `npm run qwik add` command to add additional integrations. Some examples of integrations include: Cloudflare, Netlify or Vercel server, and the [Static Site Generator (SSG)](https://qwik.builder.io/qwikcity/static-site-generation/static-site-config/). | ||
|
||
```shell | ||
npm run 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 run dev # or `yarn dev` | ||
``` | ||
|
||
> 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 | ||
npm run 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 | ||
npm run 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,38 @@ | ||
{ | ||
"name": "my-qwik-basic-starter", | ||
"description": "App with Routing built-in (recommended)", | ||
"engines": { | ||
"node": ">=15.0.0" | ||
}, | ||
"private": true, | ||
"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", | ||
"serve": "echo 'Run \"npm run qwik add\" to install a server adaptor'", | ||
"start": "vite --open --mode ssr", | ||
"qwik": "qwik" | ||
}, | ||
"devDependencies": { | ||
"@builder.io/qwik": "0.12.1", | ||
"@builder.io/qwik-city": "0.0.118", | ||
"@types/eslint": "8.4.8", | ||
"@types/node": "latest", | ||
"@typescript-eslint/eslint-plugin": "5.41.0", | ||
"@typescript-eslint/parser": "5.41.0", | ||
"eslint": "8.26.0", | ||
"eslint-plugin-qwik": "0.12.1", | ||
"node-fetch": "3.2.10", | ||
"prettier": "2.7.1", | ||
"typescript": "4.8.4", | ||
"vite": "3.2.1", | ||
"vite-tsconfig-paths": "3.5.0" | ||
} | ||
} |
Oops, something went wrong.