From 6a4b4f6beebf9da4f6325f8bb3249978016ca02e Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Thu, 11 Jul 2024 20:23:22 -0400 Subject: [PATCH] chore: improve the `pnpm add-function` command Include a boilerplate comment block with @see and @example tags filled in. --- scripts/add-function.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add-function.sh b/scripts/add-function.sh index 5535e026..8f8725d3 100644 --- a/scripts/add-function.sh +++ b/scripts/add-function.sh @@ -53,7 +53,7 @@ fi if [ ! -f "$SRC_FILE" ]; then mkdir -p "$SRC_DIR" - echo -e "export function $FUNC_NAME(): void {}\n" > "$SRC_FILE" + echo -e "/**\n * Does a thing.\n *\n * @see https://radashi-org.github.io/reference/$GROUP_NAME/$FUNC_NAME\n * @example\n * \`\`\`ts\n * $FUNC_NAME()\n * \`\`\`\n */\nexport function $FUNC_NAME(): void {}\n" > "$SRC_FILE" else echo "Warning: $SRC_FILE already exists. Skipping." fi