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

[lunox-core] run artisan command without build step #40

Open
axmad386 opened this issue Apr 17, 2023 · 2 comments
Open

[lunox-core] run artisan command without build step #40

axmad386 opened this issue Apr 17, 2023 · 2 comments
Labels
bun nice to have Nice to be implemented, but not urgent

Comments

@axmad386
Copy link
Member

For now artisan command should run only after build step, or run in watch mode (pnpm dev). So tstep by step to run artisan command for now is:

  • runpnpm build or pnpm dev, wait until source code is compiled
  • run pnpm artisan [command]

It will be nice if we can run artisan command without compiling the source code, for example using ts-node. But I was tried using it and is complicated for esm type project.
I see this magic tool for alternative
https://github.com/esbuild-kit/tsx
I think we can use it in development.

@axmad386 axmad386 added the nice to have Nice to be implemented, but not urgent label Apr 17, 2023
@axmad386 axmad386 added this to the v2.0.0 milestone Apr 17, 2023
@axmad386 axmad386 added the bun label Sep 26, 2023
@axmad386
Copy link
Member Author

With bun, we can run artisan command. Tested and working. But some part are not fully compatible

  • Bun repl not have start method yet, So artisan tinker will not run
  • Route.group should explicitly import router file instead of using string.
// Dont do this
await Route.group(base_path("routes/web"));
// instead do this
await Route.group(()=>import("path/to/route"))
  • Some third party library may not work with bun. For example jsonwebtoken and mysql2 still have open issue related bun

@axmad386 axmad386 removed this from the v2.0.0 milestone May 24, 2024
@axmad386
Copy link
Member Author

This is working example of using lunoxjs in bun environment
https://github.com/axmad386/lunox-bun-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun nice to have Nice to be implemented, but not urgent
Projects
None yet
Development

No branches or pull requests

1 participant