@cnpx/cnpx 0.0.1 → 0.0.2-dev.20260403062651
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 +6 -6
- package/out/index.d.mts +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +31 -2
- package/out/index.mjs +31 -2
- package/package.json +8 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @cnpx/cnpx@0.0.
|
|
2
|
+
> @cnpx/cnpx@0.0.2 build /home/runner/work/template/template/cnpx/core
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mESM[39m [1mout/index.mjs [22m[
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
-
[32mCJS[39m [1mout/index.js [22m[
|
|
16
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m [1mout/index.mjs [22m[32m989.00 B[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 15ms
|
|
15
|
+
[32mCJS[39m [1mout/index.js [22m[32m2.13 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 16ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 792ms
|
|
19
19
|
[32mDTS[39m [1mout/index.d.ts [22m[32m64.00 B[39m
|
|
20
20
|
[32mDTS[39m [1mout/index.d.mts [22m[32m64.00 B[39m
|
package/out/index.d.mts
CHANGED
package/out/index.d.ts
CHANGED
package/out/index.js
CHANGED
|
@@ -26,10 +26,39 @@ __export(index_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
|
|
28
28
|
// package.json
|
|
29
|
-
var version = "0.0.
|
|
29
|
+
var version = "0.0.2";
|
|
30
30
|
|
|
31
31
|
// src/index.ts
|
|
32
|
-
|
|
32
|
+
var import_prompts = require("@clack/prompts");
|
|
33
|
+
var import_colorette = require("colorette");
|
|
34
|
+
async function main() {
|
|
35
|
+
(0, import_prompts.intro)((0, import_colorette.blue)("Create a new project"));
|
|
36
|
+
const name = await (0, import_prompts.text)({ message: "Project Name", placeholder: "Cool" });
|
|
37
|
+
if ((0, import_prompts.isCancel)(name)) {
|
|
38
|
+
(0, import_prompts.cancel)("Operation cancelled");
|
|
39
|
+
return process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
const projectType = await (0, import_prompts.select)({
|
|
42
|
+
message: "Pick a project type.",
|
|
43
|
+
options: [
|
|
44
|
+
{ value: "ts", label: "TypeScript" },
|
|
45
|
+
{ value: "js", label: "JavaScript" },
|
|
46
|
+
{ value: "coffee", label: "CoffeeScript", hint: "oh no" }
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
if ((0, import_prompts.isCancel)(projectType)) {
|
|
50
|
+
(0, import_prompts.cancel)("Operation cancelled");
|
|
51
|
+
return process.exit(0);
|
|
52
|
+
}
|
|
53
|
+
const s = (0, import_prompts.spinner)();
|
|
54
|
+
s.start("Installing via npm");
|
|
55
|
+
s.stop("Installed via npm");
|
|
56
|
+
(0, import_prompts.outro)("You're all set!");
|
|
57
|
+
}
|
|
58
|
+
main().catch((err) => {
|
|
59
|
+
console.error(err);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
});
|
|
33
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
63
|
0 && (module.exports = {
|
|
35
64
|
version
|
package/out/index.mjs
CHANGED
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// package.json
|
|
4
|
-
var version = "0.0.
|
|
4
|
+
var version = "0.0.2";
|
|
5
5
|
|
|
6
6
|
// src/index.ts
|
|
7
|
-
|
|
7
|
+
import { intro, outro, select, spinner, isCancel, cancel, text } from "@clack/prompts";
|
|
8
|
+
import { blue } from "colorette";
|
|
9
|
+
async function main() {
|
|
10
|
+
intro(blue("Create a new project"));
|
|
11
|
+
const name = await text({ message: "Project Name", placeholder: "Cool" });
|
|
12
|
+
if (isCancel(name)) {
|
|
13
|
+
cancel("Operation cancelled");
|
|
14
|
+
return process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
const projectType = await select({
|
|
17
|
+
message: "Pick a project type.",
|
|
18
|
+
options: [
|
|
19
|
+
{ value: "ts", label: "TypeScript" },
|
|
20
|
+
{ value: "js", label: "JavaScript" },
|
|
21
|
+
{ value: "coffee", label: "CoffeeScript", hint: "oh no" }
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
if (isCancel(projectType)) {
|
|
25
|
+
cancel("Operation cancelled");
|
|
26
|
+
return process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
const s = spinner();
|
|
29
|
+
s.start("Installing via npm");
|
|
30
|
+
s.stop("Installed via npm");
|
|
31
|
+
outro("You're all set!");
|
|
32
|
+
}
|
|
33
|
+
main().catch((err) => {
|
|
34
|
+
console.error(err);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
});
|
|
8
37
|
export {
|
|
9
38
|
version
|
|
10
39
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cnpx/cnpx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-dev.20260403062651",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "xcfio",
|
|
6
|
-
"homepage": "https://github.com/xcfio/template/cnpx/core#readme",
|
|
6
|
+
"homepage": "https://github.com/xcfio/template/tree/main/cnpx/core#readme",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"main": "./out/index.js",
|
|
@@ -37,7 +37,13 @@
|
|
|
37
37
|
"access": "public",
|
|
38
38
|
"tag": "latest"
|
|
39
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@clack/prompts": "^1.2.0",
|
|
42
|
+
"colorette": "^2.0.20",
|
|
43
|
+
"degit": "^2.8.4"
|
|
44
|
+
},
|
|
40
45
|
"devDependencies": {
|
|
46
|
+
"@types/degit": "^2.8.6",
|
|
41
47
|
"@types/node": "^25.0.0",
|
|
42
48
|
"@vitest/ui": "4.1.2",
|
|
43
49
|
"tsup": "^8.5.1",
|