diff --git a/.bun-create/ts/.husky/pre-commit b/.bun-create/ts/.husky/pre-commit new file mode 100755 index 0000000..33def46 --- /dev/null +++ b/.bun-create/ts/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +bun pre-commit diff --git a/.bun-create/ts/package.json b/.bun-create/ts/package.json index 41cb0f2..3717ac8 100644 --- a/.bun-create/ts/package.json +++ b/.bun-create/ts/package.json @@ -10,7 +10,9 @@ "scripts": { "start": "bun --watch run src/index.ts", "build": "rimraf dist && tsc -p ./tsconfig.build.json", - "prepublishOnly": "bun run build" + "prepublishOnly": "bun run build", + "pre-commit": "bun test", + "prepare": "husky install" }, "keywords": [], "license": "MIT", @@ -22,13 +24,11 @@ "bun-types": "latest", "lint-staged": "^15.2.0", "rimraf": "^5.0.5", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "husky": "^8.0.1" }, "bun-create": { "start": "bun run dev", - "preinstall": [ - "bunx husky-init", - "npx husky add .husky/pre-commit \"npm pre-commit\"" - ] + "preinstall": [] } } diff --git a/bun.lockb b/bun.lockb index 3630f47..2cb3c22 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index f37551e..94cb677 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gev", "type": "module", - "version": "3.0.13", + "version": "3.0.14", "description": "Sets up templates", "keywords": [ "generator", @@ -49,17 +49,12 @@ "dependencies": { "chalk": "5.3.0", "commander": "11.1.0", - "execa": "8.0.1", - "globby": "14.0.0", "inquirer": "9.1.4", - "latest-version": "^7.0.0", "semver-compare": "1.0.0" }, "devDependencies": { "@types/inquirer": "^9.0.2", - "@types/latest-version": "^4.0.1", "@types/semver-compare": "^1.0.3", - "bun-plugin-dts": "^0.2.1", "bun-types": "latest", "eslint-config-gev": "^3.8.1", "husky": "^8.0.1", diff --git a/src/index.ts b/src/index.ts index 5c000fc..972549d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,9 +2,7 @@ import path from 'path'; import chalk from 'chalk'; import { Argument, Command } from 'commander'; -import { execa } from 'execa'; import inquirer from 'inquirer'; -import latestVersion from 'latest-version'; import compareSemver from 'semver-compare'; import { configData, @@ -26,7 +24,7 @@ program .helpOption('-h, --help', 'Display help for command.') // Just capitalize the first letter of description. .showHelpAfterError() .option('-c, --no-check-latest', "Won't check if is using the latest version of gev.") - .option('--config', 'Prompt for configs even after they were already set.') + .option('--config', 'Prompt for configs even if they were already set.') // https://github.com/tj/commander.js/issues/518#issuecomment-872769249 .addArgument(new Argument('