MCPcopy Create free account
hub / github.com/kentcdodds/kcd-scripts / resolveKcdScripts

Function resolveKcdScripts

src/utils.js:19–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17const appDirectory = path.dirname(pkgPath)
18
19function resolveKcdScripts() {
20 if (
21 pkg.name === 'kcd-scripts' ||
22 // this happens on install of husky within kcd-scripts locally
23 appDirectory.includes(path.join(__dirname, '..'))
24 ) {
25 return require.resolve('./').replace(process.cwd(), '.')
26 }
27 return resolveBin('kcd-scripts')
28}
29
30// eslint-disable-next-line complexity
31function resolveBin(modName, {executable = modName, cwd = process.cwd()} = {}) {

Callers 2

lintstagedrc.jsFile · 0.85
huskyrc.jsFile · 0.85

Calls 1

resolveBinFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…