Giter VIP home page Giter VIP logo

Comments (7)

Blaquewithaq avatar Blaquewithaq commented on August 19, 2024 1

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.

mrexox avatar mrexox commented on August 19, 2024

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.

cethien avatar cethien commented on August 19, 2024

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.

dalisoft avatar dalisoft commented on August 19, 2024

@mrexox @cethien #705 maybe fixes this case as removes require of Node.js and #!/usr/bin/env node

from lefthook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.