setup-cpp/packages/extension-tools/README.md

1.5 KiB

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.