@johnowennixon/chmodx

2.0.0 • Public • Published

chmodx

This is a fork of the now unpublished NPM package chmodx written by Chris Ackerman. It is based on an installed copy since the original Git repo has also been deleted. Any bugs are from the original code - which I didn't write and don't entirely understand. I have made some minor updates.

Summary

A cross platform command line utility for setting the executable bits on files. It is roughly equivalent to the Linux chmod +x <patterns...> command.

This utility was created to address the Yarn limitation where "bin" entries in package.json are not made executable on yarn link. However, it can be used any time you need to make files executable in a cross platform context.

When a file cannot be accessed:

  • An error message is printed.
  • The process continues in order to handle all remaining files.
  • The process exits with a non-zero status.

Usage

Set the executable bit on files matching glob patterns.

npx chmodx "foo/*.js" "bar/*.js"

Set the executable bit on all files referenced by your `package.json' file "bin" entry. The value(s) must be plain file paths (e.g. "src/index.js").

npx chmodx --package

Readme

Keywords

none

Package Sidebar

Install

npm i @johnowennixon/chmodx

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

4.96 kB

Total Files

7

Last publish

Collaborators

  • johnowennixon