roblox-ts / create-roblox-ts

MIT License
2 stars 7 forks source link

Support for Bun #13

Open howmanysmall opened 8 months ago

howmanysmall commented 8 months ago

Bun is just a much faster installer than NPM, PNPM, or Yarn, but it also only supports Unix systems.

It's really nice to use it over the other ones because it makes the installation process take way less time (6.35x faster than pnpm and over 8x faster than npm or yarn on my machine).

There's one drawback besides the obvious Unix only support and that's the fact that bun init -y creates more than just a package.json file, so you'd have to rm -rf the extra files it creates.

howmanysmall commented 8 months ago

My current setup for it looks a bit like:

    [PackageManager.Bun]: {
        // Sorry, this is a hack for now
        // bun init always creates the extra files when we really just want
        // package.json. ):

        // Bun also only currently supports Linux, so we'll just assume
        // rm -rf will work.
        init: "bun init -y && rm -rf index.ts .gitignore tsconfig.json README.md",
        devInstall: "bun install --silent -d",
        build: "bun run build",
    },
Dionysusnu commented 8 months ago

See also roblox-ts/roblox-ts#2485

howmanysmall commented 8 months ago

that version unfortunately wouldn't work

acopier commented 6 months ago

Until my PR is merged, you can use bun create @acopier/roblox-ts --packageManager bun.