Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build command in generated README.md does not work with Bun #614

Open
Hornwitser opened this issue Nov 14, 2024 · 1 comment
Open

Build command in generated README.md does not work with Bun #614

Hornwitser opened this issue Nov 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Hornwitser
Copy link

Describe the bug

When creating a project using bun create vue the generated readme contains the following instructions to run bun build in order to compile and minify the project.

### Compile and Minify for Production

```sh
bun build
```

But trying to run this gives a confusing error message

> bun build
bun build v1.1.34 (5e5e7c60)
error: Missing entrypoints. What would you like to bundle?

Usage:
  $ bun build <entrypoint> [...<entrypoints>] [...flags]

To see full documentation:
  $ bun build --help

This doesn't work because Bun has a built-in build command which gets executed instead of the build script defined in package.json.

Expected behavior

The generated readme uses bun run build instead, as this will run the build script instead of the built-in bun bundler.

How to reproduce

  1. Run bun create vue
  2. Accept all defaults
  3. Observe that vue-project/README.md mentions using bun build instead of bun run build
  4. Observe that running bun build gives an error message instead of invoking the build script.
@Hornwitser Hornwitser added the bug Something isn't working label Nov 14, 2024
@cexbrayat
Copy link
Member

Hi @Hornwitser

👍 Can you open a PR to fix this? We will gladly review and merge it!

The readme generator is in

export default function generateReadme({
I think there are no unit tests for this function, but you can add some in __test__ if you're up to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants