create-qwik 0.0.112 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.0.112",
3
+ "version": "0.9.0",
4
4
  "description": "Interactive CLI for create Qwik projects and adding features.",
5
5
  "bin": "./create-qwik.cjs",
6
6
  "main": "./index.cjs",
@@ -12,6 +12,7 @@ bazel-testlogs
12
12
  dist
13
13
  dist-dev
14
14
  lib
15
+ lib-types
15
16
  etc
16
17
  external
17
18
  node_modules
@@ -1,6 +1,7 @@
1
1
  # Build
2
2
  /dist
3
3
  /lib
4
+ /lib-types
4
5
  /server
5
6
 
6
7
  # Development
@@ -4,6 +4,7 @@
4
4
  "build": "qwik build",
5
5
  "build.client": "vite build",
6
6
  "build.preview": "vite build --ssr src/entry.preview.tsx",
7
+ "build.types": "tsc --incremental --noEmit",
7
8
  "dev": "vite --mode ssr",
8
9
  "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
9
10
  "fmt": "prettier --write .",
@@ -11,17 +12,16 @@
11
12
  "lint": "eslint \"src/**/*.ts*\"",
12
13
  "preview": "qwik build preview && vite preview --open",
13
14
  "start": "vite --open --mode ssr",
14
- "typecheck": "tsc --incremental --noEmit",
15
15
  "qwik": "qwik"
16
16
  },
17
17
  "devDependencies": {
18
- "@builder.io/qwik": "0.0.112",
18
+ "@builder.io/qwik": "0.9.0",
19
19
  "@builder.io/qwik-city": "0.0.111",
20
20
  "@types/eslint": "8.4.6",
21
21
  "@types/node": "latest",
22
22
  "@typescript-eslint/eslint-plugin": "5.37.0",
23
23
  "@typescript-eslint/parser": "5.37.0",
24
- "eslint-plugin-qwik": "0.0.112",
24
+ "eslint-plugin-qwik": "0.9.0",
25
25
  "eslint": "8.23.1",
26
26
  "node-fetch": "3.2.10",
27
27
  "prettier": "2.7.1",
@@ -0,0 +1,31 @@
1
+ **/*.log
2
+ **/.DS_Store
3
+ *.
4
+ .vscode/settings.json
5
+ .history
6
+ .yarn
7
+ bazel-*
8
+ bazel-bin
9
+ bazel-out
10
+ bazel-qwik
11
+ bazel-testlogs
12
+ dist
13
+ dist-dev
14
+ lib
15
+ lib-types
16
+ etc
17
+ external
18
+ node_modules
19
+ temp
20
+ tsc-out
21
+ tsdoc-metadata.json
22
+ target
23
+ output
24
+ rollup.config.js
25
+ build
26
+ .cache
27
+ .vscode
28
+ .rollup.cache
29
+ dist
30
+ tsconfig.tsbuildinfo
31
+ vite.config.ts
@@ -0,0 +1,40 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: {
4
+ browser: true,
5
+ es2021: true,
6
+ node: true,
7
+ },
8
+ extends: [
9
+ 'eslint:recommended',
10
+ 'plugin:@typescript-eslint/recommended',
11
+ 'plugin:qwik/recommended',
12
+ ],
13
+ parser: '@typescript-eslint/parser',
14
+ parserOptions: {
15
+ tsconfigRootDir: __dirname,
16
+ project: ['./tsconfig.json'],
17
+ ecmaVersion: 2021,
18
+ sourceType: 'module',
19
+ ecmaFeatures: {
20
+ jsx: true,
21
+ },
22
+ },
23
+ plugins: ['@typescript-eslint'],
24
+ rules: {
25
+ '@typescript-eslint/no-explicit-any': 'off',
26
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
27
+ '@typescript-eslint/no-inferrable-types': 'off',
28
+ '@typescript-eslint/no-non-null-assertion': 'off',
29
+ '@typescript-eslint/no-empty-interface': 'off',
30
+ '@typescript-eslint/no-namespace': 'off',
31
+ '@typescript-eslint/no-empty-function': 'off',
32
+ '@typescript-eslint/no-this-alias': 'off',
33
+ '@typescript-eslint/ban-types': 'off',
34
+ '@typescript-eslint/ban-ts-comment': 'off',
35
+ 'prefer-spread': 'off',
36
+ 'no-case-declarations': 'off',
37
+ 'no-console': 'off',
38
+ '@typescript-eslint/no-unused-vars': ['error'],
39
+ },
40
+ };
@@ -0,0 +1,6 @@
1
+ # Files Prettier should not format
2
+ **/*.log
3
+ **/.DS_Store
4
+ *.
5
+ dist
6
+ node_modules
@@ -0,0 +1,47 @@
1
+ # Qwik Library ⚡️
2
+
3
+ - [Qwik Docs](https://qwik.builder.io/)
4
+ - [Discord](https://qwik.builder.io/chat)
5
+ - [Qwik Github](https://github.com/BuilderIO/qwik)
6
+ - [@QwikDev](https://twitter.com/QwikDev)
7
+ - [Vite](https://vitejs.dev/)
8
+ - [Partytown](https://partytown.builder.io/)
9
+ - [Mitosis](https://github.com/BuilderIO/mitosis)
10
+ - [Builder.io](https://www.builder.io/)
11
+
12
+ ---
13
+
14
+ ## Project Structure
15
+
16
+ Inside of you project, you'll see the following directories and files:
17
+
18
+ ```
19
+ ├── public/
20
+ │ └── ...
21
+ └── src/
22
+ ├── components/
23
+ │ └── ...
24
+ └── index.ts
25
+ ```
26
+
27
+ - `src/components`: Recommended directory for components.
28
+
29
+ - `index.ts`: This is the entry point of your component library, make sure all the public components are exported from this file.
30
+
31
+ ## Development
32
+
33
+ Development mode uses [Vite's development server](https://vitejs.dev/). For Qwik during development, the `dev` command will also server-side render (SSR) the output. The client-side development modules loaded by the browser.
34
+
35
+ ```
36
+ npm run dev
37
+ ```
38
+
39
+ > Note: during dev mode, Vite will request many JS files, which does not represent a Qwik production build.
40
+
41
+ ## Production
42
+
43
+ The production build should generate the production build of your component library in (./lib) and the typescript type definitions in (./lib-types).
44
+
45
+ ```
46
+ npm run build
47
+ ```
@@ -0,0 +1,38 @@
1
+ # Build
2
+ /dist
3
+ /lib
4
+ /lib-types
5
+ /server
6
+
7
+ # Development
8
+ node_modules
9
+
10
+ # Cache
11
+ .cache
12
+ .mf
13
+ .vscode
14
+ .rollup.cache
15
+ tsconfig.tsbuildinfo
16
+
17
+ # Logs
18
+ logs
19
+ *.log
20
+ npm-debug.log*
21
+ yarn-debug.log*
22
+ yarn-error.log*
23
+ pnpm-debug.log*
24
+ lerna-debug.log*
25
+
26
+ # Editor
27
+ !.vscode/extensions.json
28
+ .idea
29
+ .DS_Store
30
+ *.suo
31
+ *.ntvs*
32
+ *.njsproj
33
+ *.sln
34
+ *.sw?
35
+
36
+ # Yarn
37
+ .yarn/*
38
+ !.yarn/releases
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "qwik-library-starter",
2
+ "name": "qwik-library-name",
3
3
  "description": "Create a component library",
4
4
  "version": "0.0.1",
5
5
  "private": false,
6
6
  "main": "./lib/index.qwik.cjs",
7
7
  "qwik": "./lib/index.qwik.mjs",
8
8
  "module": "./lib/index.qwik.mjs",
9
- "types": "./lib/types/index.d.ts",
9
+ "types": "./lib-types/index.d.ts",
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
@@ -15,16 +15,35 @@
15
15
  }
16
16
  },
17
17
  "files": [
18
- "lib"
18
+ "lib",
19
+ "lib-types"
19
20
  ],
20
21
  "scripts": {
21
- "build": "npm run build.lib && npm run build.types",
22
+ "build": "qwik build",
22
23
  "build.lib": "vite build --mode lib",
23
24
  "build.types": "tsc --emitDeclarationOnly",
25
+ "dev": "vite --mode ssr",
26
+ "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
27
+ "fmt": "prettier --write .",
28
+ "fmt.check": "prettier --check .",
29
+ "lint": "eslint \"src/**/*.ts*\"",
30
+ "start": "vite --open --mode ssr",
31
+ "qwik": "qwik",
24
32
  "release": "np"
25
33
  },
26
34
  "devDependencies": {
27
- "np": "7.6.1"
35
+ "@builder.io/qwik": "0.9.0",
36
+ "@types/eslint": "8.4.6",
37
+ "@types/node": "latest",
38
+ "@typescript-eslint/eslint-plugin": "5.37.0",
39
+ "@typescript-eslint/parser": "5.37.0",
40
+ "eslint-plugin-qwik": "latest",
41
+ "eslint": "8.23.1",
42
+ "node-fetch": "3.2.10",
43
+ "np": "7.6.1",
44
+ "prettier": "2.7.1",
45
+ "typescript": "4.8.3",
46
+ "vite": "3.1.1"
28
47
  },
29
48
  "__qwik__": {
30
49
  "priority": -1
@@ -0,0 +1,17 @@
1
+ /*
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * Development entry point using only client-side modules:
5
+ * - Do not use this mode in production!
6
+ * - No SSR
7
+ * - No portion of the application is pre-rendered on the server.
8
+ * - All of the application is running eagerly in the browser.
9
+ * - More code is transferred to the browser than in SSR mode.
10
+ * - Optimizer/Serialization/Deserialization code is not exercised!
11
+ */
12
+ import { render, RenderOptions } from '@builder.io/qwik';
13
+ import Root from './root';
14
+
15
+ export default function (opts: RenderOptions) {
16
+ return render(document, <Root />, opts);
17
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * SSR entry point, in all cases the application is render outside the browser, this
5
+ * entry point will be the common one.
6
+ *
7
+ * - Server (express, cloudflare...)
8
+ * - npm run start
9
+ * - npm run preview
10
+ * - npm run build
11
+ *
12
+ */
13
+ import { renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server';
14
+ import { manifest } from '@qwik-client-manifest';
15
+ import Root from './root';
16
+
17
+ export default function (opts: RenderToStreamOptions) {
18
+ return renderToStream(<Root />, {
19
+ manifest,
20
+ ...opts,
21
+ prefetchStrategy: {
22
+ implementation: {
23
+ linkInsert: null,
24
+ workerFetchInsert: null,
25
+ prefetchEvent: 'always',
26
+ },
27
+ },
28
+ });
29
+ }
@@ -3,7 +3,7 @@ import { Logo } from './components/logo/logo';
3
3
 
4
4
  export default () => {
5
5
  return (
6
- <html>
6
+ <>
7
7
  <head>
8
8
  <meta charSet="utf-8" />
9
9
  <title>Qwik Blank App</title>
@@ -12,6 +12,6 @@ export default () => {
12
12
  <Logo />
13
13
  <Counter />
14
14
  </body>
15
- </html>
15
+ </>
16
16
  );
17
17
  };
@@ -8,7 +8,7 @@
8
8
  "jsxImportSource": "@builder.io/qwik",
9
9
  "strict": true,
10
10
  "declaration": true,
11
- "declarationDir": "lib/types",
11
+ "declarationDir": "lib-types",
12
12
  "resolveJsonModule": true,
13
13
  "moduleResolution": "node",
14
14
  "esModuleInterop": true,