Comments (7)
For those of you, that want to utilize this package with bun now, Ive figured out a quick patch solution until bun support has been officially added.
Add these to your package.json file and you'll be good to go.
"prepare:lefthook": "lefthook install && bun -e \"const fs=require('node:fs'); fs.writeFileSync('node_modules/lefthook/bin/index.js', fs.readFileSync('node_modules/lefthook/bin/index.js', 'utf8').replace(/^#!\\/usr\\/bin\\/env\\s+node/gm, '#!/usr/bin/env bun'))\"",
"postinstall": "bun prepare:lefthook"
from lefthook.
Hey! Thank you for creating an issue. Do you have an idea of how an executable script could be run with either nodejs or bun? I can think of a statically built executable (probably with bun) but I have concerns. It would be great to know if there's a common solution for such cases. I will investigate
from lefthook.
bun is intended as a node replacement, so just calling a script.js file should work fine.
It would be great to know if there's a common solution for such cases. I will investigate
i will check out some stuff and give a comment
from lefthook.
@mrexox @cethien #705 maybe fixes this case as removes require of Node.js and #!/usr/bin/env node
from lefthook.
Related Issues (20)
- Include git output when commands fail HOT 1
- lefthook.yml is automatically added when using my library HOT 4
- `stage_fixed`: `Couldn't stage fixed files:fork/exec C:\Program Files\Git\mingw64\bin\git.exe: The filename or extension is too long.` on Windows HOT 2
- Pass `--all-files` flag to the command being run during the hook HOT 4
- Performance for `npm` could be even more faster? HOT 4
- submit logo to simple-icon HOT 1
- Error: Cannot find module 'lefthook-linux-x64/bin/lefthook' on git commit after updating npm dependency to 1.6.10 HOT 8
- "no matching staged files" error when I ran "pre-commit" manually HOT 2
- `exclude` configuration as array HOT 1
- Error message when lefthook is older could include more info HOT 1
- Prepackaged PHP Composer
- It was detected as a virus. HOT 3
- lefthook fails git command when run with GIT_TRACE=1 HOT 1
- Option to redirect standard input to `/dev/null` HOT 5
- fetch new scripts automatically when remote scripts changed HOT 1
- new feature refetch remotes config sync hooks fail HOT 15
- Paths with brackets parsed incorrectly in Windows environment HOT 3
- 1.6.16 not available in apt/rpm repos HOT 1
- Bug: Global extend options will take precedence over local options HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lefthook.