Skip to content

Commit

Permalink
feat(@angular/create): add support to bun package manager
Browse files Browse the repository at this point in the history
This commit adds support to use `bun` as a package manager.

Closes #26837
  • Loading branch information
alan-agius4 committed Jan 25, 2024
1 parent b3e2067 commit 600498f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/angular/create/README.md
Expand Up @@ -23,3 +23,9 @@ yarn create @angular [project-name] [...options]
```
pnpm create @angular [project-name] [...options]
```

### bun

```
bun create @angular [project-name] [...options]
```
2 changes: 1 addition & 1 deletion packages/angular/create/src/index.ts
Expand Up @@ -17,7 +17,7 @@ const hasPackageManagerArg = args.some((a) => a.startsWith('--package-manager'))
if (!hasPackageManagerArg) {
// Ex: yarn/1.22.18 npm/? node/v16.15.1 linux x64
const packageManager = process.env['npm_config_user_agent']?.split('/')[0];
if (packageManager && ['npm', 'pnpm', 'yarn', 'cnpm'].includes(packageManager)) {
if (packageManager && ['npm', 'pnpm', 'yarn', 'cnpm', 'bun'].includes(packageManager)) {
args.push('--package-manager', packageManager);
}
}
Expand Down

0 comments on commit 600498f

Please sign in to comment.