From 67ba549126e226cb43ef65d2af8b537611abb267 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 2 Dec 2024 17:56:06 +0000 Subject: [PATCH] Update binary option to use the cli if installed globally (#253) - Update package.json to use the cli if installed globally #183 Reviewed-on: https://git.vylpes.xyz/RabbitLabs/random-bunny/pulls/253 Reviewed-by: Copilot Reviewed-by: VylpesTester Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- package.json | 4 +++- src/cli.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a2da45..9f65850 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,9 @@ "author": "Vylpes", "exports": "./dist/index.js", "typings": "./dist/index.d.ts", - "bin": "./dist/cli.js", + "bin": { + "random-bunny": "./dist/cli.js" + }, "main": "./dist/index.js", "keywords": [ "rabbit", diff --git a/src/cli.ts b/src/cli.ts index 496c5e9..9ad67b2 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node import { Command, Option } from "commander"; import randomBunny from "./index"; import ICliOptions from "./contracts/ICliOptions";