create-qwik 0.12.1 → 0.13.0-dev20221108030156

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/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * create-qwik 0.12.1
3
+ * create-qwik 0.13.0-dev20221108030156
4
4
  * Copyright Builder.io, Inc. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/BuilderIO/qwik/blob/main/LICENSE
@@ -125,7 +125,7 @@ ${m.bgRed(` ${t} install failed `)}
125
125
 
126
126
  You might need to run "${m.green(`${d} install`)}" manually inside the root of the project.
127
127
 
128
- `;console.error(g)}}catch(p){l&&l.fail(),Ye(String(p))}};return{rootDir:t.rootDir,integration:r,updates:i,commit:s}}async function zi(t,e){jp()?e=process.cwd():(e=Xi(e),$t.default.existsSync(e)&&Ye(`Directory "${e}" already exists. Please either remove this directory, or choose another location.`));let i=await kt({starterId:t,outDir:e});return Zi(i,!1),i}function Zi(t,e){console.log(""),console.log("");let r=process.cwd()===t.outDir,i=(0,De.relative)(process.cwd(),t.outDir);console.log(r?`\u{1F984} ${m.bgMagenta(" Success! ")}`:`\u{1F984} ${m.bgMagenta(" Success! ")} ${m.cyan("Project created in")} ${m.bold(m.magenta(i))} ${m.cyan("directory")}`),console.log(""),console.log(`\u{1F430} ${m.cyan("Next steps:")}`),r||console.log(` cd ${i}`);let s=_e();e||console.log(` ${s} install`),console.log(` ${s} start`),console.log("");let n=s==="yarn"?"yarn qwik add":`${s} run qwik add`;console.log(`\u{1F50C} ${m.cyan("Integrations? Add Netlify, Cloudflare, Tailwind...")}`),console.log(` ${n}`),console.log(""),On(t.docs),console.log(`\u{1F4FA} ${m.cyan("Presentations, Podcasts and Videos:")}`),console.log(" https://qwik.builder.io/media/"),console.log("")}async function kt(t){if(!sl(t.starterId))throw new Error("Missing starter id");if(!sl(t.outDir))throw new Error("Missing outDir");if(!(0,De.isAbsolute)(t.outDir))throw new Error("outDir must be an absolute path");$t.default.existsSync(t.outDir)||$t.default.mkdirSync(t.outDir,{recursive:!0});let e={starterId:t.starterId,outDir:t.outDir,docs:[]},r=(await Ve()).filter(s=>s.type==="app");if(t.starterId==="library"){let s=r.find(n=>n.id==="library");if(!s)throw new Error("Unable to find base app");await il(e,s)}else{let s=r.find(o=>o.id==="base");if(!s)throw new Error("Unable to find base app");let n=r.find(o=>o.id===t.starterId);if(!n)throw new Error(`Invalid starter id "${t.starterId}". It can only be one of${r.map(o=>` "${o.id}"`)}.`);await il(e,s,n)}return e}async function il(t,e,r){t.docs.push(...e.docs);let i=r??e,s=En({...e.pkgJson,name:`my-${i.pkgJson.name}`,description:i.pkgJson.description,scripts:void 0,dependencies:void 0,devDependencies:void 0});await Sn(t.outDir,s);let n=(0,De.join)(t.outDir,"README.md");await $t.default.promises.writeFile(n,""),await(await Ki({rootDir:t.outDir,integration:e.id,installDeps:!1})).commit(!1),r&&(t.docs.push(...r.docs),await(await Ki({rootDir:t.outDir,integration:r.id,installDeps:!1})).commit(!1))}function sl(t){return typeof t=="string"&&t.trim().length>0}function Xi(t){return(0,De.resolve)(process.cwd(),t)}function jp(){return Lp()}function Lp(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var un=M(require("fs")),$c=require("path"),Jt=M(Pc());async function hn(){H0(),console.log(""),console.clear(),console.log(""),console.log(`\u{1F430} ${m.cyan("Let's create a")} ${m.bold(m.magenta("Qwik"))} ${m.cyan("app")} \u{1F407} ${m.dim("v0.12.1")}`),console.log("");let t=_e(),r=(await Ve()).filter(S=>S.type==="app"),i=r.find(S=>S.id==="base"),s=r.filter(S=>S.id!==i.id),n=tl(t,i),o=await(0,Jt.default)({type:"text",name:"outDir",message:"Where would you like to create your new project?",initial:"./qwik-app"},{onCancel:()=>{console.log(""),process.exit(1)}});console.log("");let a=Xi(o.outDir.trim()),l=null;if(un.default.existsSync(a)){let S=await(0,Jt.default)({type:"select",name:"outDirChoice",message:`Directory "./${(0,$c.relative)(process.cwd(),a)}" already exists. What would you like to do?`,choices:[{title:"Do not overwrite this directory and exit",value:"exit"},{title:"Overwrite and replace this directory",value:"replace"}],hint:"(use \u2193\u2191 arrows, hit enter)"},{onCancel:async()=>{console.log(m.dim(` - Exited without modifying "${a}"`)+`
128
+ `;console.error(g)}}catch(p){l&&l.fail(),Ye(String(p))}};return{rootDir:t.rootDir,integration:r,updates:i,commit:s}}async function zi(t,e){jp()?e=process.cwd():(e=Xi(e),$t.default.existsSync(e)&&Ye(`Directory "${e}" already exists. Please either remove this directory, or choose another location.`));let i=await kt({starterId:t,outDir:e});return Zi(i,!1),i}function Zi(t,e){console.log(""),console.log("");let r=process.cwd()===t.outDir,i=(0,De.relative)(process.cwd(),t.outDir);console.log(r?`\u{1F984} ${m.bgMagenta(" Success! ")}`:`\u{1F984} ${m.bgMagenta(" Success! ")} ${m.cyan("Project created in")} ${m.bold(m.magenta(i))} ${m.cyan("directory")}`),console.log(""),console.log(`\u{1F430} ${m.cyan("Next steps:")}`),r||console.log(` cd ${i}`);let s=_e();e||console.log(` ${s} install`),console.log(` ${s} start`),console.log("");let n=s==="yarn"?"yarn qwik add":`${s} run qwik add`;console.log(`\u{1F50C} ${m.cyan("Integrations? Add Netlify, Cloudflare, Tailwind...")}`),console.log(` ${n}`),console.log(""),On(t.docs),console.log(`\u{1F4FA} ${m.cyan("Presentations, Podcasts and Videos:")}`),console.log(" https://qwik.builder.io/media/"),console.log("")}async function kt(t){if(!sl(t.starterId))throw new Error("Missing starter id");if(!sl(t.outDir))throw new Error("Missing outDir");if(!(0,De.isAbsolute)(t.outDir))throw new Error("outDir must be an absolute path");$t.default.existsSync(t.outDir)||$t.default.mkdirSync(t.outDir,{recursive:!0});let e={starterId:t.starterId,outDir:t.outDir,docs:[]},r=(await Ve()).filter(s=>s.type==="app");if(t.starterId==="library"){let s=r.find(n=>n.id==="library");if(!s)throw new Error("Unable to find base app");await il(e,s)}else{let s=r.find(o=>o.id==="base");if(!s)throw new Error("Unable to find base app");let n=r.find(o=>o.id===t.starterId);if(!n)throw new Error(`Invalid starter id "${t.starterId}". It can only be one of${r.map(o=>` "${o.id}"`)}.`);await il(e,s,n)}return e}async function il(t,e,r){t.docs.push(...e.docs);let i=r??e,s=En({...e.pkgJson,name:`my-${i.pkgJson.name}`,description:i.pkgJson.description,scripts:void 0,dependencies:void 0,devDependencies:void 0});await Sn(t.outDir,s);let n=(0,De.join)(t.outDir,"README.md");await $t.default.promises.writeFile(n,""),await(await Ki({rootDir:t.outDir,integration:e.id,installDeps:!1})).commit(!1),r&&(t.docs.push(...r.docs),await(await Ki({rootDir:t.outDir,integration:r.id,installDeps:!1})).commit(!1))}function sl(t){return typeof t=="string"&&t.trim().length>0}function Xi(t){return(0,De.resolve)(process.cwd(),t)}function jp(){return Lp()}function Lp(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var un=M(require("fs")),$c=require("path"),Jt=M(Pc());async function hn(){H0(),console.log(""),console.clear(),console.log(""),console.log(`\u{1F430} ${m.cyan("Let's create a")} ${m.bold(m.magenta("Qwik"))} ${m.cyan("app")} \u{1F407} ${m.dim("v0.13.0-dev20221108030156")}`),console.log("");let t=_e(),r=(await Ve()).filter(S=>S.type==="app"),i=r.find(S=>S.id==="base"),s=r.filter(S=>S.id!==i.id),n=tl(t,i),o=await(0,Jt.default)({type:"text",name:"outDir",message:"Where would you like to create your new project?",initial:"./qwik-app"},{onCancel:()=>{console.log(""),process.exit(1)}});console.log("");let a=Xi(o.outDir.trim()),l=null;if(un.default.existsSync(a)){let S=await(0,Jt.default)({type:"select",name:"outDirChoice",message:`Directory "./${(0,$c.relative)(process.cwd(),a)}" already exists. What would you like to do?`,choices:[{title:"Do not overwrite this directory and exit",value:"exit"},{title:"Overwrite and replace this directory",value:"replace"}],hint:"(use \u2193\u2191 arrows, hit enter)"},{onCancel:async()=>{console.log(m.dim(` - Exited without modifying "${a}"`)+`
129
129
  `),await n.abort(),process.exit(1)}});console.log(""),S.outDirChoice==="replace"?l=un.default.promises.rm(a,{recursive:!0}):(console.log(m.dim(` - Exited without modifying "${a}"`)+`
130
130
  `),await n.abort(),process.exit(1))}let u=await(0,Jt.default)({type:"select",name:"starterId",message:"Select a starter",choices:s.map(S=>{var w;return{title:S.name,value:S.id,description:"\u2514\u2500"+((w=S.pkgJson)==null?void 0:w.description)}}),hint:"(use \u2193\u2191 arrows, hit enter)"},{onCancel:async()=>{console.log(""),await n.abort(),process.exit(1)}});console.log("");let p=u.starterId,f=await(0,Jt.default)({type:"confirm",name:"runInstall",message:`Would you like to install ${t} dependencies?`,initial:!0},{onCancel:async()=>{console.log(""),await n.abort(),process.exit(1)}});console.log(""),l&&await l;let d=f.runInstall,v=await kt({starterId:p,outDir:a}),b=await n.complete(d,v.outDir);return Zi(v,b),v}function H0(){let t=process.version;Number(t.replace("v","").split(".")[0])<16&&(console.error(m.red(`Qwik requires Node.js 16 or higher. You are currently running Node.js ${t}.`)),process.exit(1))}async function W0(){try{let t=process.argv.slice(2);t.length>=2?await zi(t[0],t[1]):await hn()}catch(t){Ye(t.message||t)}}0&&(module.exports={createApp,runCli,runCreateCli,runCreateInteractiveCli});
131
131
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.12.1",
3
+ "version": "0.13.0-dev20221108030156",
4
4
  "description": "Interactive CLI for create Qwik projects and adding features.",
5
5
  "bin": "./create-qwik.cjs",
6
6
  "main": "./index.cjs",
@@ -33,7 +33,7 @@ Inside your project, you'll see the following directory structure:
33
33
 
34
34
  ## Add Integrations
35
35
 
36
- 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/).
36
+ Use the `npm run 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/).
37
37
 
38
38
  ```shell
39
39
  npm run qwik add # or `yarn qwik add`
@@ -16,18 +16,18 @@
16
16
  "qwik": "qwik"
17
17
  },
18
18
  "devDependencies": {
19
- "@builder.io/qwik": "0.12.1",
19
+ "@builder.io/qwik": "0.13.0-dev20221108030156",
20
20
  "@builder.io/qwik-city": "0.0.118",
21
- "@types/eslint": "8.4.8",
21
+ "@types/eslint": "8.4.9",
22
22
  "@types/node": "latest",
23
- "@typescript-eslint/eslint-plugin": "5.41.0",
24
- "@typescript-eslint/parser": "5.41.0",
25
- "eslint-plugin-qwik": "0.12.1",
23
+ "@typescript-eslint/eslint-plugin": "5.42.0",
24
+ "@typescript-eslint/parser": "5.42.0",
25
+ "eslint-plugin-qwik": "0.13.0-dev20221108030156",
26
26
  "eslint": "8.26.0",
27
27
  "node-fetch": "3.2.10",
28
28
  "prettier": "2.7.1",
29
29
  "typescript": "4.8.4",
30
- "vite": "3.2.1",
30
+ "vite": "3.2.2",
31
31
  "vite-tsconfig-paths": "3.5.0"
32
32
  },
33
33
  "private": true
File without changes
@@ -10,10 +10,11 @@
10
10
  * - https://vitejs.dev/config/preview-options.html#preview-options
11
11
  *
12
12
  */
13
- import { qwikCity } from '@builder.io/qwik-city/middleware/node';
13
+ import { createQwikCity } from '@builder.io/qwik-city/middleware/node';
14
14
  import render from './entry.ssr';
15
+ import qwikCityPlan from '@qwik-city-plan';
15
16
 
16
17
  /**
17
18
  * The default export is the QwikCity adaptor used by Vite preview.
18
19
  */
19
- export default qwikCity(render);
20
+ export default createQwikCity({ render, qwikCityPlan });
@@ -18,6 +18,10 @@ export default function (opts: RenderToStreamOptions) {
18
18
  return renderToStream(<Root />, {
19
19
  manifest,
20
20
  ...opts,
21
+ // Use container attributes to set attributes on the html tag.
22
+ containerAttributes: {
23
+ lang: 'en-us',
24
+ },
21
25
  prefetchStrategy: {
22
26
  implementation: {
23
27
  linkInsert: null,
@@ -49,7 +49,7 @@ ul {
49
49
  }
50
50
 
51
51
  li {
52
- padding: 5px 0;
52
+ padding: 8px 0;
53
53
  }
54
54
 
55
55
  li::marker {
@@ -85,7 +85,7 @@ export default component$(() => {
85
85
  </tr>
86
86
  <tr>
87
87
  <td>
88
- <code>npm run qwik add static-node</code>
88
+ <code>npm run qwik add static</code>
89
89
  </td>
90
90
  <td>
91
91
  <a
@@ -136,4 +136,10 @@ export default component$(() => {
136
136
 
137
137
  export const head: DocumentHead = {
138
138
  title: 'Welcome to Qwik',
139
+ meta: [
140
+ {
141
+ name: 'description',
142
+ content: 'Qwik site description',
143
+ },
144
+ ],
139
145
  };
@@ -92,7 +92,7 @@ export default component$(() => {
92
92
  </tr>
93
93
  <tr>
94
94
  <td>
95
- <code>npm run qwik add static-node</code>
95
+ <code>npm run qwik add static</code>
96
96
  </td>
97
97
  <td>
98
98
  <a
@@ -5,7 +5,6 @@
5
5
  "private": false,
6
6
  "main": "./lib/index.qwik.mjs",
7
7
  "qwik": "./lib/index.qwik.mjs",
8
- "module": "./lib/index.qwik.mjs",
9
8
  "types": "./lib-types/index.d.ts",
10
9
  "type": "module",
11
10
  "exports": {
@@ -33,18 +32,18 @@
33
32
  "release": "np"
34
33
  },
35
34
  "devDependencies": {
36
- "@builder.io/qwik": "0.12.1",
37
- "@types/eslint": "8.4.8",
35
+ "@builder.io/qwik": "0.13.0",
36
+ "@types/eslint": "8.4.9",
38
37
  "@types/node": "latest",
39
- "@typescript-eslint/eslint-plugin": "5.41.0",
40
- "@typescript-eslint/parser": "5.41.0",
38
+ "@typescript-eslint/eslint-plugin": "5.42.0",
39
+ "@typescript-eslint/parser": "5.42.0",
41
40
  "eslint-plugin-qwik": "latest",
42
41
  "eslint": "8.26.0",
43
42
  "node-fetch": "3.2.10",
44
43
  "np": "7.6.1",
45
44
  "prettier": "2.7.1",
46
45
  "typescript": "4.8.4",
47
- "vite": "3.2.1"
46
+ "vite": "3.2.2"
48
47
  },
49
48
  "__qwik__": {
50
49
  "displayName": "Component library",