hyperbrew / bolt-uxp

A lightning-fast boilerplate for building Adobe UXP Plugins in React, Svelte or Vue built on Vite + TypeScript + Sass
MIT License
29 stars 3 forks source link

Support `npm` in `create-bolt-uxp` #7

Closed Klustre closed 2 months ago

Klustre commented 6 months ago

In the spirit of supporting various frameworks it would be nice when yarn is opt-in. To support npm we have to check if the yarn command is available and propose to use npm otherwise. There are hints that yarn can be used alongside npm. Is this correct? I'm not able to implement this right now, but happy to do so when I can.

The affected lines in create-bolt-uxp:

https://github.com/hyperbrew/bolt-uxp/blob/d9497ca0d53ba15e29dce4d75e9abc0602411de9/create-bolt-uxp/src/build.ts#L246

https://github.com/hyperbrew/bolt-uxp/blob/d9497ca0d53ba15e29dce4d75e9abc0602411de9/create-bolt-uxp/src/build.ts#L272

Klustre commented 3 months ago

@justintaylor-dev This is the key I mentioned yesterday: packageManager

It's part of an experimental feature called Corepack which needs to be enabled, but there are discussions going on to enable it by default.

Klustre commented 2 months ago

Found this as well: which-pm-runs

Supports npm, pnpm, Yarn, cnpm, bun and any other package managers that set the npm_config_user_agent env variable.