Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/toplenboren/simple-git-hooks
/ functions
Functions
25 in github.com/toplenboren/simple-git-hooks
⨍
Functions
25
◇
Types & classes
0
↓ 26 callers
Function
getInstalledGitHooks
* Returns all installed git hooks * @return { {string: string} }
simple-git-hooks.test.js:219
↓ 22 callers
Function
createGitHooksFolder
* Creates .git/hooks dir from root * @param {string} root
simple-git-hooks.test.js:197
↓ 9 callers
Function
_getConfigFromFile
* Gets user-set config from file * Since the file is not required in node.js projects it returns undefined if something is off * @param {string} pro
simple-git-hooks.js:384
↓ 5 callers
Function
expectCommitToFail
(path)
simple-git-hooks.test.js:679
↓ 3 callers
Function
_getConfig
* Gets user-set command either from sources * First try to get command from .simple-pre-commit.json * If not found -> try to get command from packag
simple-git-hooks.js:327
↓ 2 callers
Function
_getCustomConfigPath
* Takes the first argument from current process argv and returns it * Returns empty string when argument wasn't passed * @param {string[]} [argv] *
simple-git-hooks.js:310
↓ 2 callers
Function
_getHooksDirPath
* Returns the absolute path to the Git hooks directory. * Respects user-defined core.hooksPath from Git config if present; * otherwise defaults to <
simple-git-hooks.js:197
↓ 2 callers
Function
_getPackageJson
Reads package.json file, returns package.json content and path * @param {string} projectPath - a path to the project, defaults to process.cwd * @ret
simple-git-hooks.js:289
↓ 2 callers
Function
_removeHook
* Removes the pre-commit hook * @param {string} hook * @param {string} projectRoot * @private
simple-git-hooks.js:273
↓ 2 callers
Function
expectCommitToSucceed
(path)
simple-git-hooks.test.js:675
↓ 2 callers
Function
removeGitHooksFolder
* Removes .git directory from root * @param {string} root
simple-git-hooks.test.js:209
↓ 2 callers
Function
setHooksFromConfig
* Parses the config and sets git hooks * @param {string} projectRootPath * @param {string[]} [argv]
simple-git-hooks.js:169
↓ 2 callers
Function
skipInstall
Checks if the environment variable for skipping hooks is defined.
simple-git-hooks.js:427
↓ 2 callers
Function
tryToPerformTestCommit
(path, env = process.env)
simple-git-hooks.test.js:663
↓ 1 callers
Function
_arraysAreEqual
(a1, a2)
simple-git-hooks.js:103
↓ 1 callers
Function
_getConfigFromPackageJson
* Gets current config from package.json[simple-pre-commit] * @param {string} projectRootPath * @throws TypeError if packageJsonPath is not a string
simple-git-hooks.js:371
↓ 1 callers
Function
_setHook
* Creates or replaces an existing executable script in the git hooks directory with provided command * @param {string} hook * @param {string} comman
simple-git-hooks.js:224
↓ 1 callers
Function
_validateHooks
* Validates the config, checks that every git hook or option is named correctly * @return {boolean} * @param {{string: string}} config
simple-git-hooks.js:416
↓ 1 callers
Function
checkSimpleGitHooksInDependencies
* Checks the 'simple-git-hooks' in dependencies of the project * @param {string} projectRootPath * @throws TypeError if packageJsonData not an objec
simple-git-hooks.js:146
↓ 1 callers
Function
getGitProjectRoot
* Recursively gets the .git folder path from provided directory * @param {string} directory * @return {string | undefined} .git folder path or undef
simple-git-hooks.js:60
↓ 1 callers
Function
getProjectRootDirectoryFromNodeModules
* Transforms the <project>/node_modules/simple-git-hooks to <project> * @param projectPath - path to the simple-git-hooks in node modules * @return
simple-git-hooks.js:102
↓ 1 callers
Function
initializeGitRepository
(path)
simple-git-hooks.test.js:654
↓ 1 callers
Function
postinstall
* Creates the pre-commit from command in config by default
postinstall.js:9
↓ 1 callers
Function
removeHooks
* Deletes all git hooks * @param {string} projectRoot
simple-git-hooks.js:251
↓ 1 callers
Function
uninstall
* Removes the pre-commit from command in config by default
uninstall.js:9