setup-cpp/packages/extension-tools
Amin Yahyaabadi b4a83891fb feat: add untildify-user package 2022-08-07 20:04:59 -07:00
..
src feat: add extension-tools package 2022-08-07 18:33:21 -07:00
README.md feat: add extension-tools package 2022-08-07 18:33:21 -07:00
package.json feat: add untildify-user package 2022-08-07 20:04:59 -07:00
tsconfig.json feat: add extension-tools package 2022-08-07 18:33:21 -07:00

README.md

extension-tools

Version License: Apache--2.0

Tools for working with file extensions such as getting the binary and shell extension on different platforms.

Install

npm install --save extension-tools

Usage

addBinExtension (function)

Add bin extension to the given binary name.

Parameters:

  • name (string) - The name you want to add the shell extension to
  • win_ext (string) - .exe on Windows
  • unix_ext (string) - "" On unix.

returns: string

addShellExtension (function)

Add native shell extension to the given name

Parameters:

  • name (string) - The name you want to add the shell extension to
  • win_ext (string) - .bat on Windows
  • unix_ext (string) - .sh On unix.

returns: string

addShellHere (function)

Prefix a ./ for unix shell and nothing for the cmd shell

Parameters:

  • name (string)

returns: string

🤝 Contributing

You can sponsor my work here:

https://github.com/sponsors/aminya

Pull requests, issues and feature requests are welcome. See the Contributing guide.