Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.19 KB

File metadata and controls

61 lines (44 loc) · 1.19 KB

execify-cli

Cross-platform chmod +x. Easily make a Node.js CLI executable.

Sets executable permissions on given binaries, or optionally on every binary in the nearest package.json.

Works well in build scripts:

// package.json
"scripts": {
	"build": "tsc && execify --pkg"
}

Install

npm install --save-dev execify-cli
Other Package Managers

yarn add --dev execify-cli
pnpm add --save-dev execify-cli

Usage

Usage
  $ execify [paths…]

Options
  --package, --pkg, -p  Set every binary in package.json as executable

Examples
  $ execify foo.js bar.ts baz/xyz.sh
  ✔ Execified "foo.js"
  ⚠ File "foo.js" is missing a shebang!
  ℹ File "bar.ts" is already executable
  ✖ Failed to execify "baz/xyz.sh", file not found

  $ execify --pkg
  ✔ Execified "./dist/foo.js" (foo-cli)
  ✔ Execified "./dist/bar.js" (bar-cli)

Related

  • chmodx - A cross platform command line utility for setting the executable bits on files.
  • make-executable - Set or remove the executable bits on a file.