Skip to content

Commit

Permalink
chore: improve the pnpm add-function command
Browse files Browse the repository at this point in the history
Include a boilerplate comment block with @see and @example tags filled in.
  • Loading branch information
aleclarson committed Jul 12, 2024
1 parent 024f88f commit 6a4b4f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/add-function.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a4b4f6

Please sign in to comment.