MCPcopy Create free account

hub / github.com/toplenboren/simple-git-hooks / functions

Functions25 in github.com/toplenboren/simple-git-hooks

↓ 26 callersFunctiongetInstalledGitHooks
* Returns all installed git hooks * @return { {string: string} }
simple-git-hooks.test.js:219
↓ 22 callersFunctioncreateGitHooksFolder
* Creates .git/hooks dir from root * @param {string} root
simple-git-hooks.test.js:197
↓ 9 callersFunction_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 callersFunctionexpectCommitToFail
(path)
simple-git-hooks.test.js:679
↓ 3 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_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 callersFunction_removeHook
* Removes the pre-commit hook * @param {string} hook * @param {string} projectRoot * @private
simple-git-hooks.js:273
↓ 2 callersFunctionexpectCommitToSucceed
(path)
simple-git-hooks.test.js:675
↓ 2 callersFunctionremoveGitHooksFolder
* Removes .git directory from root * @param {string} root
simple-git-hooks.test.js:209
↓ 2 callersFunctionsetHooksFromConfig
* Parses the config and sets git hooks * @param {string} projectRootPath * @param {string[]} [argv]
simple-git-hooks.js:169
↓ 2 callersFunctionskipInstall
Checks if the environment variable for skipping hooks is defined.
simple-git-hooks.js:427
↓ 2 callersFunctiontryToPerformTestCommit
(path, env = process.env)
simple-git-hooks.test.js:663
↓ 1 callersFunction_arraysAreEqual
(a1, a2)
simple-git-hooks.js:103
↓ 1 callersFunction_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 callersFunction_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 callersFunction_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 callersFunctioncheckSimpleGitHooksInDependencies
* 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 callersFunctiongetGitProjectRoot
* 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 callersFunctiongetProjectRootDirectoryFromNodeModules
* 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 callersFunctioninitializeGitRepository
(path)
simple-git-hooks.test.js:654
↓ 1 callersFunctionpostinstall
* Creates the pre-commit from command in config by default
postinstall.js:9
↓ 1 callersFunctionremoveHooks
* Deletes all git hooks * @param {string} projectRoot
simple-git-hooks.js:251
↓ 1 callersFunctionuninstall
* Removes the pre-commit from command in config by default
uninstall.js:9