leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
314 stars 87 forks source link

Proposal for update of program flow #233

Open crapStone opened 4 months ago

crapStone commented 4 months ago

The current program flow makes it difficult to add new "plugins" (like external commands) or new features like #125.

I propose to make the program flow bidirectional or use a callback based flow similar to Rollup. This makes it possible to pass information like the generated file names back up to the caller.

Currently I am very busy with my exams, but in a month or two I can work out a concrete proposal and submit a PR.

gbj commented 4 months ago

For the sake of clarity: The main thing blocking implementing new features like #125 is that the original creator/maintainer of cargo-leptos has moved on, and everyone else involved has pretty limited time.

If you think a new architecture would help move the tool forward, or you're interested in getting more involved but not as currently designed, then a proposal is definitely welcome.

If you just want to see some specific features or smaller issues resolved, addressing them individually may be easier than rewriting.

crapStone commented 4 months ago

I tried to fix this issue back in October, but it wasn't possible, because the filenames are immutably set at the start of the "compilation" process.