Motivation: Expo supports starting a new app with npm, pnpm, yarn, and bun. Our CLI should respect those options as well.
Additional motivation:bun is around 5-10x faster (I haven't actually measured but it's quite significant) than npm for the initial app creation. The feedback cycle when developing this library is a lot faster if we can test the CLI using bun.
Details
Detects the package manager that was used to start thoughtbelt. So, if for example, we created a new app by running bunx thoughtbelt MyApp, thoughtbelt now detects that it's running in a Bun environment and executes bunx create-expo. Since the Expo CLI has similar logic, it creates the new app using Bun (i.e. runs bun install, which creates a bun lockfile). The same logic also applies to running yarn create expo, npx create-expo, and pnpm create expo.
Additionally, this PR also adds flags to specify the package manager to use for the new app, so we can for example run npx thoughtbelt@latest MyApp --bun, and it will create the Expo app with Bun. I think this will be less used, and we might even want to remove prior to v1.
Motivation: Expo supports starting a new app with npm, pnpm, yarn, and bun. Our CLI should respect those options as well.
Additional motivation:
bun
is around 5-10x faster (I haven't actually measured but it's quite significant) thannpm
for the initial app creation. The feedback cycle when developing this library is a lot faster if we can test the CLI usingbun
.Details
Detects the package manager that was used to start thoughtbelt. So, if for example, we created a new app by running
bunx thoughtbelt MyApp
, thoughtbelt now detects that it's running in a Bun environment and executesbunx create-expo
. Since the Expo CLI has similar logic, it creates the new app using Bun (i.e. runsbun install
, which creates a bun lockfile). The same logic also applies to runningyarn create expo
,npx create-expo
, andpnpm create expo
.Additionally, this PR also adds flags to specify the package manager to use for the new app, so we can for example run
npx thoughtbelt@latest MyApp --bun
, and it will create the Expo app with Bun. I think this will be less used, and we might even want to remove prior to v1.