create-fragno 0.0.1 → 0.0.2

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.
@@ -1,13 +1,12 @@
1
1
  $ tsdown
2
2
  ℹ tsdown v0.15.6 powered by rolldown v1.0.0-beta.41
3
- ℹ Using tsdown config: /home/jan/rejot/fragno/packages/cli/tsdown.config.ts
3
+ ℹ Using tsdown config: /home/runner/work/fragno/fragno/packages/cli/tsdown.config.ts
4
4
  ℹ entry: index.ts
5
5
  ℹ target: node20.0.0
6
6
  ℹ tsconfig: tsconfig.json
7
7
  ℹ Build start
8
- ℹ Cleaning 3 files
9
- ℹ dist/index.js 1.82 kB │ gzip: 0.70 kB
10
- ℹ dist/index.js.map 3.22 kB │ gzip: 1.08 kB
8
+ ℹ dist/index.js 1.92 kB │ gzip: 0.71 kB
9
+ ℹ dist/index.js.map 3.30 kB │ gzip: 1.08 kB
11
10
  ℹ dist/index.d.ts 0.01 kB │ gzip: 0.03 kB
12
- ℹ 3 files, total: 5.05 kB
13
- ✔ Build complete in 1793ms
11
+ ℹ 3 files, total: 5.23 kB
12
+ ✔ Build complete in 9121ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # create-fragno
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ae891ac: Create fragment templates using 'npm create fragno'
8
+ - Updated dependencies [ae891ac]
9
+ - @fragno-dev/create@0.0.2
package/dist/index.js CHANGED
@@ -3,10 +3,11 @@ import { create } from "@fragno-dev/create";
3
3
  import * as p from "@clack/prompts";
4
4
 
5
5
  //#region index.ts
6
- const createCommand = defineCommand({
6
+ const main = defineCommand({
7
7
  meta: {
8
8
  name: "create",
9
- description: "Interactively create project from template"
9
+ description: "Interactively create project from template",
10
+ version: process.env["npm_package_version"]
10
11
  },
11
12
  async run() {
12
13
  p.intro("@fragno-dev/create");
@@ -44,6 +45,10 @@ const createCommand = defineCommand({
44
45
  const buildTool = await p.select({
45
46
  message: "Pick a build tool",
46
47
  options: [
48
+ {
49
+ value: "vite",
50
+ label: "vite"
51
+ },
47
52
  {
48
53
  value: "tsdown",
49
54
  label: "tsdown"
@@ -52,9 +57,21 @@ const createCommand = defineCommand({
52
57
  value: "esbuild",
53
58
  label: "esbuild"
54
59
  },
60
+ {
61
+ value: "rollup",
62
+ label: "rollup"
63
+ },
64
+ {
65
+ value: "webpack",
66
+ label: "webpack"
67
+ },
68
+ {
69
+ value: "rspack",
70
+ label: "rspack"
71
+ },
55
72
  {
56
73
  value: "none",
57
- label: "none"
74
+ label: "None (bring your own)"
58
75
  }
59
76
  ]
60
77
  });
@@ -71,14 +88,6 @@ const createCommand = defineCommand({
71
88
  p.outro("Project created successfully!");
72
89
  }
73
90
  });
74
- const main = defineCommand({
75
- meta: {
76
- name: "fragno",
77
- version: process.env["npm_package_version"],
78
- description: "Fragno CLI"
79
- },
80
- subCommands: { create: createCommand }
81
- });
82
91
  runMain(main);
83
92
 
84
93
  //#endregion
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../index.ts"],"sourcesContent":["import { defineCommand, runMain } from \"citty\";\nimport { create } from \"@fragno-dev/create\";\nimport * as p from \"@clack/prompts\";\n\nconst createCommand = defineCommand({\n meta: {\n name: \"create\",\n description: \"Interactively create project from template\",\n },\n async run() {\n p.intro(\"@fragno-dev/create\");\n\n const name = await p.text({\n message: \"What is your project name?\",\n placeholder: \"my-fragment\",\n validate(value) {\n if (value.length === 0) return \"Project name is required!\";\n return undefined;\n },\n });\n\n if (p.isCancel(name)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n const projectPath = await p.text({\n message: \"Where should we create your project?\",\n placeholder: `./${name}`,\n initialValue: `./${name}`,\n });\n\n if (p.isCancel(projectPath)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n const template = await p.select({\n message: \"Pick a template\",\n options: [{ value: \"fragment\", label: \"Fragment\" }],\n });\n\n if (p.isCancel(template)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n const buildTool = await p.select({\n message: \"Pick a build tool\",\n options: [\n { value: \"tsdown\", label: \"tsdown\" },\n { value: \"esbuild\", label: \"esbuild\" },\n { value: \"none\", label: \"none\" },\n ],\n });\n\n if (p.isCancel(buildTool)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n create({\n name: name,\n path: projectPath,\n template: template,\n buildTool: buildTool,\n });\n\n p.outro(\"Project created successfully!\");\n },\n});\n\nconst main = defineCommand({\n meta: {\n name: \"fragno\",\n version: process.env[\"npm_package_version\"],\n description: \"Fragno CLI\",\n },\n subCommands: {\n create: createCommand,\n },\n});\n\nrunMain(main);\n"],"mappings":";;;;;AAIA,MAAM,gBAAgB,cAAc;CAClC,MAAM;EACJ,MAAM;EACN,aAAa;EACd;CACD,MAAM,MAAM;AACV,IAAE,MAAM,qBAAqB;EAE7B,MAAM,OAAO,MAAM,EAAE,KAAK;GACxB,SAAS;GACT,aAAa;GACb,SAAS,OAAO;AACd,QAAI,MAAM,WAAW,EAAG,QAAO;;GAGlC,CAAC;AAEF,MAAI,EAAE,SAAS,KAAK,EAAE;AACpB,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;EAGjB,MAAM,cAAc,MAAM,EAAE,KAAK;GAC/B,SAAS;GACT,aAAa,KAAK;GAClB,cAAc,KAAK;GACpB,CAAC;AAEF,MAAI,EAAE,SAAS,YAAY,EAAE;AAC3B,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;EAGjB,MAAM,WAAW,MAAM,EAAE,OAAO;GAC9B,SAAS;GACT,SAAS,CAAC;IAAE,OAAO;IAAY,OAAO;IAAY,CAAC;GACpD,CAAC;AAEF,MAAI,EAAE,SAAS,SAAS,EAAE;AACxB,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;EAGjB,MAAM,YAAY,MAAM,EAAE,OAAO;GAC/B,SAAS;GACT,SAAS;IACP;KAAE,OAAO;KAAU,OAAO;KAAU;IACpC;KAAE,OAAO;KAAW,OAAO;KAAW;IACtC;KAAE,OAAO;KAAQ,OAAO;KAAQ;IACjC;GACF,CAAC;AAEF,MAAI,EAAE,SAAS,UAAU,EAAE;AACzB,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;AAGjB,SAAO;GACC;GACN,MAAM;GACI;GACC;GACZ,CAAC;AAEF,IAAE,MAAM,gCAAgC;;CAE3C,CAAC;AAEF,MAAM,OAAO,cAAc;CACzB,MAAM;EACJ,MAAM;EACN,SAAS,QAAQ,IAAI;EACrB,aAAa;EACd;CACD,aAAa,EACX,QAAQ,eACT;CACF,CAAC;AAEF,QAAQ,KAAK"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../index.ts"],"sourcesContent":["import { defineCommand, runMain } from \"citty\";\nimport { create } from \"@fragno-dev/create\";\nimport * as p from \"@clack/prompts\";\n\nconst main = defineCommand({\n meta: {\n name: \"create\",\n description: \"Interactively create project from template\",\n version: process.env[\"npm_package_version\"],\n },\n async run() {\n p.intro(\"@fragno-dev/create\");\n\n const name = await p.text({\n message: \"What is your project name?\",\n placeholder: \"my-fragment\",\n validate(value) {\n if (value.length === 0) return \"Project name is required!\";\n return undefined;\n },\n });\n\n if (p.isCancel(name)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n const projectPath = await p.text({\n message: \"Where should we create your project?\",\n placeholder: `./${name}`,\n initialValue: `./${name}`,\n });\n\n if (p.isCancel(projectPath)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n const template = await p.select({\n message: \"Pick a template\",\n options: [{ value: \"fragment\", label: \"Fragment\" }],\n });\n\n if (p.isCancel(template)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n const buildTool = await p.select({\n message: \"Pick a build tool\",\n options: [\n { value: \"vite\", label: \"vite\" },\n { value: \"tsdown\", label: \"tsdown\" },\n { value: \"esbuild\", label: \"esbuild\" },\n { value: \"rollup\", label: \"rollup\" },\n { value: \"webpack\", label: \"webpack\" },\n { value: \"rspack\", label: \"rspack\" },\n { value: \"none\", label: \"None (bring your own)\" },\n ],\n });\n\n if (p.isCancel(buildTool)) {\n p.cancel(\"Operation cancelled.\");\n process.exit(0);\n }\n\n create({\n name: name,\n path: projectPath,\n template: template,\n buildTool: buildTool,\n });\n\n p.outro(\"Project created successfully!\");\n },\n});\n\nrunMain(main);\n"],"mappings":";;;;;AAIA,MAAM,OAAO,cAAc;CACzB,MAAM;EACJ,MAAM;EACN,aAAa;EACb,SAAS,QAAQ,IAAI;EACtB;CACD,MAAM,MAAM;AACV,IAAE,MAAM,qBAAqB;EAE7B,MAAM,OAAO,MAAM,EAAE,KAAK;GACxB,SAAS;GACT,aAAa;GACb,SAAS,OAAO;AACd,QAAI,MAAM,WAAW,EAAG,QAAO;;GAGlC,CAAC;AAEF,MAAI,EAAE,SAAS,KAAK,EAAE;AACpB,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;EAGjB,MAAM,cAAc,MAAM,EAAE,KAAK;GAC/B,SAAS;GACT,aAAa,KAAK;GAClB,cAAc,KAAK;GACpB,CAAC;AAEF,MAAI,EAAE,SAAS,YAAY,EAAE;AAC3B,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;EAGjB,MAAM,WAAW,MAAM,EAAE,OAAO;GAC9B,SAAS;GACT,SAAS,CAAC;IAAE,OAAO;IAAY,OAAO;IAAY,CAAC;GACpD,CAAC;AAEF,MAAI,EAAE,SAAS,SAAS,EAAE;AACxB,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;EAGjB,MAAM,YAAY,MAAM,EAAE,OAAO;GAC/B,SAAS;GACT,SAAS;IACP;KAAE,OAAO;KAAQ,OAAO;KAAQ;IAChC;KAAE,OAAO;KAAU,OAAO;KAAU;IACpC;KAAE,OAAO;KAAW,OAAO;KAAW;IACtC;KAAE,OAAO;KAAU,OAAO;KAAU;IACpC;KAAE,OAAO;KAAW,OAAO;KAAW;IACtC;KAAE,OAAO;KAAU,OAAO;KAAU;IACpC;KAAE,OAAO;KAAQ,OAAO;KAAyB;IAClD;GACF,CAAC;AAEF,MAAI,EAAE,SAAS,UAAU,EAAE;AACzB,KAAE,OAAO,uBAAuB;AAChC,WAAQ,KAAK,EAAE;;AAGjB,SAAO;GACC;GACN,MAAM;GACI;GACC;GACZ,CAAC;AAEF,IAAE,MAAM,gCAAgC;;CAE3C,CAAC;AAEF,QAAQ,KAAK"}
package/index.ts CHANGED
@@ -2,10 +2,11 @@ import { defineCommand, runMain } from "citty";
2
2
  import { create } from "@fragno-dev/create";
3
3
  import * as p from "@clack/prompts";
4
4
 
5
- const createCommand = defineCommand({
5
+ const main = defineCommand({
6
6
  meta: {
7
7
  name: "create",
8
8
  description: "Interactively create project from template",
9
+ version: process.env["npm_package_version"],
9
10
  },
10
11
  async run() {
11
12
  p.intro("@fragno-dev/create");
@@ -48,9 +49,13 @@ const createCommand = defineCommand({
48
49
  const buildTool = await p.select({
49
50
  message: "Pick a build tool",
50
51
  options: [
52
+ { value: "vite", label: "vite" },
51
53
  { value: "tsdown", label: "tsdown" },
52
54
  { value: "esbuild", label: "esbuild" },
53
- { value: "none", label: "none" },
55
+ { value: "rollup", label: "rollup" },
56
+ { value: "webpack", label: "webpack" },
57
+ { value: "rspack", label: "rspack" },
58
+ { value: "none", label: "None (bring your own)" },
54
59
  ],
55
60
  });
56
61
 
@@ -70,15 +75,4 @@ const createCommand = defineCommand({
70
75
  },
71
76
  });
72
77
 
73
- const main = defineCommand({
74
- meta: {
75
- name: "fragno",
76
- version: process.env["npm_package_version"],
77
- description: "Fragno CLI",
78
- },
79
- subCommands: {
80
- create: createCommand,
81
- },
82
- });
83
-
84
78
  runMain(main);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fragno",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "exports": {
5
5
  ".": {
6
6
  "bun": "./index.ts",
@@ -23,13 +23,15 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^22",
26
- "@fragno-private/typescript-config": "0.0.1"
26
+ "@fragno-private/typescript-config": "0.0.1",
27
+ "@fragno-private/vitest-config": "0.0.0"
27
28
  },
28
29
  "dependencies": {
29
30
  "@clack/prompts": "^0.11.0",
30
- "@fragno-dev/create": "0.0.1",
31
+ "@fragno-dev/create": "0.0.2",
31
32
  "citty": "^0.1.6"
32
33
  },
34
+ "private": false,
33
35
  "main": "./dist/index.js",
34
36
  "module": "./dist/index.js",
35
37
  "types": "./dist/index.d.ts"
package/vitest.config.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { defineConfig } from "vitest/config";
2
+ import { baseConfig } from "@fragno-private/vitest-config";
2
3
 
3
- export default defineConfig({});
4
+ export default defineConfig(baseConfig);