@shd101wyy/yo 0.1.17 → 0.1.18
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/.github/skills/yo-async-effects/SKILL.md +48 -0
- package/.github/skills/yo-async-effects/async-effects-recipes.md +262 -0
- package/.github/skills/yo-core-patterns/SKILL.md +48 -0
- package/.github/skills/yo-core-patterns/core-patterns-cheatsheet.md +318 -0
- package/.github/skills/yo-project-workflow/SKILL.md +47 -0
- package/.github/skills/yo-project-workflow/workflow-cheatsheet.md +255 -0
- package/.github/skills/yo-syntax/SKILL.md +57 -0
- package/.github/skills/yo-syntax/syntax-cheatsheet.md +398 -0
- package/.github/skills/yo-wasm-integration/SKILL.md +46 -0
- package/.github/skills/yo-wasm-integration/wasm-integration-cheatsheet.md +250 -0
- package/README.md +9 -1
- package/out/cjs/yo-cli.cjs +453 -451
- package/out/cjs/yo-lsp.cjs +1 -1
- package/out/types/src/skills-command.d.ts +4 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/scripts/build-site.ts +23 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shd101wyy/yo",
|
|
3
3
|
"displayName": "Yo",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.18",
|
|
5
5
|
"main": "./out/cjs/index.cjs",
|
|
6
6
|
"module": "./out/esm/index.mjs",
|
|
7
7
|
"types": "./out/types/src/index.d.ts",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"out",
|
|
14
14
|
"scripts",
|
|
15
15
|
"vendor",
|
|
16
|
-
"std"
|
|
16
|
+
"std",
|
|
17
|
+
".github/skills"
|
|
17
18
|
],
|
|
18
19
|
"repository": "https://github.com/shd101wyy/yo",
|
|
19
20
|
"author": "Yiyi Wang <shd101wyy@gmail.com>",
|
package/scripts/build-site.ts
CHANGED
|
@@ -25,25 +25,26 @@ import { execFileSync } from "child_process";
|
|
|
25
25
|
const ROOT = path.resolve(import.meta.dir, "..");
|
|
26
26
|
const GITHUB_REPO = "https://github.com/shd101wyy/Yo";
|
|
27
27
|
|
|
28
|
-
// Detect the
|
|
29
|
-
// Falls back to "
|
|
30
|
-
export function
|
|
28
|
+
// Detect the exact tag on HEAD for stable GitHub blob links.
|
|
29
|
+
// Falls back to "develop" if HEAD has no exact tag or git fails.
|
|
30
|
+
export function getExactTagOrDevelop(rootDir: string = ROOT): string {
|
|
31
31
|
try {
|
|
32
|
-
const result = execFileSync(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
const result = execFileSync(
|
|
33
|
+
"git",
|
|
34
|
+
["describe", "--tags", "--exact-match", "HEAD"],
|
|
35
|
+
{
|
|
36
|
+
cwd: rootDir,
|
|
37
|
+
encoding: "utf-8",
|
|
38
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
39
|
+
timeout: 5000,
|
|
40
|
+
}
|
|
41
|
+
).trim();
|
|
42
|
+
return result || "develop";
|
|
39
43
|
} catch {
|
|
40
|
-
return "
|
|
44
|
+
return "develop";
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
const GITHUB_REF = getLatestTag();
|
|
45
|
-
const GITHUB_BLOB = `${GITHUB_REPO}/blob/${GITHUB_REF}`;
|
|
46
|
-
|
|
47
48
|
export function getStdDocCommand(rootDir: string = ROOT): {
|
|
48
49
|
command: string;
|
|
49
50
|
args: string[];
|
|
@@ -74,6 +75,14 @@ if (!siteVersion) {
|
|
|
74
75
|
siteVersion = detectGitVersion(ROOT);
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
// Use the explicit version (e.g., "v0.1.17" from --version flag) for blob links
|
|
79
|
+
// when it looks like a tag; otherwise use the exact tag on HEAD; otherwise "develop".
|
|
80
|
+
const GITHUB_REF =
|
|
81
|
+
siteVersion && /^v\d/.test(siteVersion)
|
|
82
|
+
? siteVersion
|
|
83
|
+
: getExactTagOrDevelop(ROOT);
|
|
84
|
+
const GITHUB_BLOB = `${GITHUB_REPO}/blob/${GITHUB_REF}`;
|
|
85
|
+
|
|
77
86
|
function detectGitVersion(cwd: string): string | undefined {
|
|
78
87
|
function git(...gitArgs: string[]): string | undefined {
|
|
79
88
|
try {
|