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.
- package/.turbo/turbo-build.log +5 -6
- package/CHANGELOG.md +9 -0
- package/dist/index.js +20 -11
- package/dist/index.js.map +1 -1
- package/index.ts +7 -13
- package/package.json +5 -3
- package/vitest.config.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
$ tsdown
|
|
2
2
|
[34mℹ[39m tsdown [2mv0.15.6[22m powered by rolldown [2mv1.0.0-beta.41[22m
|
|
3
|
-
[34mℹ[39m Using tsdown config: [4m/home/
|
|
3
|
+
[34mℹ[39m Using tsdown config: [4m/home/runner/work/fragno/fragno/packages/cli/tsdown.config.ts[24m
|
|
4
4
|
[34mℹ[39m entry: [34mindex.ts[39m
|
|
5
5
|
[34mℹ[39m target: [34mnode20.0.0[39m
|
|
6
6
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
7
7
|
[34mℹ[39m Build start
|
|
8
|
-
[34mℹ[39m
|
|
9
|
-
[34mℹ[39m [2mdist/[
|
|
10
|
-
[34mℹ[39m [2mdist/[22mindex.js.map [2m3.22 kB[22m [2m│ gzip: 1.08 kB[22m
|
|
8
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m1.92 kB[22m [2m│ gzip: 0.71 kB[22m
|
|
9
|
+
[34mℹ[39m [2mdist/[22mindex.js.map [2m3.30 kB[22m [2m│ gzip: 1.08 kB[22m
|
|
11
10
|
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
12
|
-
[34mℹ[39m 3 files, total: 5.
|
|
13
|
-
[32m✔[39m Build complete in [
|
|
11
|
+
[34mℹ[39m 3 files, total: 5.23 kB
|
|
12
|
+
[32m✔[39m Build complete in [32m9121ms[39m
|
package/CHANGELOG.md
ADDED
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
|
|
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: "
|
|
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
|
|
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
|
|
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: "
|
|
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.
|
|
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.
|
|
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