Closed hawkrives closed 7 years ago
An attempt at #93.
I'm not sure if this is an optimal solution, but this allows you to define "npm": false in your pre-commit config to skip invoking npm's binary.
"npm": false
Instead, the current implementation simply takes the cmd name as ./node_modules/.bin/$cmd and runs it.
./node_modules/.bin/$cmd
I suppose that this should use which to look for the binary before running it, which I can do if you'd prefer.
which
I'm also not sure if/how you'd like this tested, so all I've done is ensure that it works on my project.
Example:
"pre-commit": { "npm": false, "run": "lint-staged" },
Coverage decreased (-0.8%) to 94.619% when pulling c9655d018c7d1065b214d2950dd6136bfe1faf43 on hawkrives:patch-1 into f55b66b9c75b73a903f5b77c7c511a13e0c7edff on observing:master.
Well. Um. I guess I have some more work to do. Apologies for the noise!
(I wound up not using pre-commit, so I never finished fixing this.)
An attempt at #93.
I'm not sure if this is an optimal solution, but this allows you to define
"npm": false
in your pre-commit config to skip invoking npm's binary.Instead, the current implementation simply takes the cmd name as
./node_modules/.bin/$cmd
and runs it.I suppose that this should use
which
to look for the binary before running it, which I can do if you'd prefer.I'm also not sure if/how you'd like this tested, so all I've done is ensure that it works on my project.
Example: