clang-format-git
Version:
Node wrapper for git-clang-format Python script as a standalone native binary to allow execution without a Python dependency.🐉
31 lines (30 loc) • 2.04 kB
TypeScript
/**
* Returns the ABSOLUTE path to the `git-clang-format` executable binary based on the OS platform and architecture.
*
* The possible combinations are `darwin-arm64`, `darwin-x64`, `linux-arm`, `linux-arm64`, `linux-ppc64`, `linux-s390x`, `linux-x64`, `win32-x64`.
*
* Throws an error if the executable is not found.
* @param {string} osPlatform The current operating system platform. (e.g., `darwin`, `linux`, `win32`)
* @param {string} architecture The current system architecture. (e.g., `arm`, `arm64`, `ppc64`, `s390x`, `x64`)
* @returns {string} The ABSOLUTE path to the `git-clang-format` executable binary.
* @throws `Error` Throws an error if the executable binary is not found for the specified OS platform and architecture.
* @alias `getClangFormatGitPath`. See {@link getClangFormatGitPath}.
* @version `v1.2.0` Initial release.
* @see https://clang-format-node.lumir.page/docs/apis/clang-format-git
*/
export function getGitClangFormatPath(osPlatform: string, architecture: string): string;
/**
* Returns the ABSOLUTE path to the `git-clang-format` executable binary based on the OS platform and architecture.
*
* The possible combinations are `darwin-arm64`, `darwin-x64`, `linux-arm`, `linux-arm64`, `linux-ppc64`, `linux-s390x`, `linux-x64`, `win32-x64`.
*
* Throws an error if the executable is not found.
* @param {string} osPlatform The current operating system platform. (e.g., `darwin`, `linux`, `win32`)
* @param {string} architecture The current system architecture. (e.g., `arm`, `arm64`, `ppc64`, `s390x`, `x64`)
* @returns {string} The ABSOLUTE path to the `git-clang-format` executable binary.
* @throws `Error` Throws an error if the executable binary is not found for the specified OS platform and architecture.
* @alias `getClangFormatGitPath`. See {@link getClangFormatGitPath}.
* @version `v1.2.0` Initial release.
* @see https://clang-format-node.lumir.page/docs/apis/clang-format-git
*/
export function getClangFormatGitPath(osPlatform: string, architecture: string): string;