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

[feat] 2.0: Add plugin to lib.rs with tauri plugin add #7696

Closed
Tracked by #1344
lorenzolewis opened this issue Aug 26, 2023 · 3 comments · Fixed by #8490
Closed
Tracked by #1344

[feat] 2.0: Add plugin to lib.rs with tauri plugin add #7696

lorenzolewis opened this issue Aug 26, 2023 · 3 comments · Fixed by #8490

Comments

@lorenzolewis
Copy link
Member

Describe the problem

tauri plugin add updates package.json and Cargo.toml from what I understand, but there's one more friction point for non-Rust devs: adding the plugin initialiser to the builder in lib.rs. tauri plugin add should do this as part of it's logic

Describe the solution you'd like

Example flow for notification plugin:

  1. ✅ User runs tauri plugin add notification
  2. ✅ Add dependency to package.json and Cargo.toml (I believe this is already done today)
  3. 🆕 Add plugin initialiser to lib.rs on the Tauri app builder (not done today)
  4. ❓(optional) Prompt the user with "these are the changes to the files that are going to be made, ready to accept them?" or similar (check out the astro add CLI for how they do that)

Alternatives considered

No response

Additional context

@lorenzolewis
Copy link
Member Author

@amrbashir we talked about this briefly on Discord a while back, do you think this is something we'd be able to get in (and if so would you be the one able to work on it)? I think this is a pretty crucial piece of DX improvement we can get in prior to 2.0

@amrbashir
Copy link
Member

It is definitely on my radar but not super urgent atm and could be added at any time later if we couldn't get it before 2.0-beta.

@lorenzolewis
Copy link
Member Author

As long as we can try to slot it before 2.0 stable then that's fine to me. Thanks!

amrbashir added a commit that referenced this issue Dec 28, 2023
lucasfernog added a commit that referenced this issue Feb 1, 2024
* feat(cli/add): add plugin to `main.rs`

closes #7696

* clippy

* fix change file

* adjust regex

* run cargo fmt

* check if already exists

* typo [skip ci]

---------

Co-authored-by: Lucas Nogueira <[email protected]>
@amrbashir amrbashir moved this from 📋 Backlog to ✅ Done in Roadmap Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants