clang-format-git-python
Node wrapper for git-clang-format Python script. This package requires Python3 as a dependency.
The CLI invokes a command named python, so ensure that python --version resolves to Python 3 in your environment.
TIP
This package also supports JSDoc type hints with the following APIs, so you'll see more detailed information directly in your code editor.
Installation
This package already includes clang-format-node as a dependency, so there's no need to install it separately.
# Global
$ npm install -g clang-format-git-python
# Local
$ npm install -D clang-format-git-python# Global
$ pnpm add -g clang-format-git-python
# Local
$ pnpm add -D clang-format-git-python# Global
$ yarn global add clang-format-git-python
# Local
$ yarn add --dev clang-format-git-python# Run without adding to the project
$ yarn dlx clang-format-git-python
# Local
$ yarn add --dev clang-format-git-python# Global
$ bun add -g clang-format-git-python
# Local
$ bun add -d clang-format-git-pythonCLI Commands
You can use the commands below to run git-clang-format.
NOTE
clang-format-git-python is an alias for git-clang-format and works in exactly the same way.
npx git-clang-formatnpx clang-format-git-pythonNode.js APIs
These APIs depend on the Node.js fs and path modules and the file system, so you cannot use them in browsers.
CommonJS
jsconst { gitClangFormatPath, clangFormatGitPythonPath, } = require('clang-format-git-python');ES Modules
jsimport { gitClangFormatPath, clangFormatGitPythonPath, } from 'clang-format-git-python';
gitClangFormatPath
Type:
string
The ABSOLUTE path to the git-clang-format Python script.
- Type:
string - Alias:
clangFormatGitPythonPath. SeeclangFormatGitPythonPath. - Version:
v1.2.0Initial release.
clangFormatGitPythonPath
Type:
string
Alias for gitClangFormatPath.
- Alias:
gitClangFormatPath. SeegitClangFormatPath. - Version:
v1.2.0Initial release.