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

Astro plugin with partytown support #708

Open
ViorelMocanu opened this issue Oct 23, 2023 · 10 comments
Open

Astro plugin with partytown support #708

ViorelMocanu opened this issue Oct 23, 2023 · 10 comments

Comments

@ViorelMocanu
Copy link

It would be great (and it would help promote your solution) if you could create an Astro plugin. The integration is super simple even without one, but it would probably help visibility and usage for Astro enthusiasts.

Of course, having an option to add the Light vs Full script is essential (since Astro prides itself to be as lightweight as possible).

Another required step you could take is natively integrating with Astro Partytown as an optional feature, while you're at it.

Then you could get listed as a new recipe in the Astro Integrations marketplace, Astro Integrations Guide or generic recipes section (or, ideally, everywhere).

Thank you for the wonderful product you're building!

@adriaandotcom
Copy link
Contributor

Happy to give you a year for free in exchange for a plugin :)

@ViorelMocanu
Copy link
Author

Happy to give you a year for free in exchange for a plugin :)

It's a deal! :) I'll bump this issue when I have one ready. Any preferences on coding styles or any other aspects I should be aware of before getting started?

@adriaandotcom
Copy link
Contributor

Just use the default prettier and we're good to go!

@ViorelMocanu
Copy link
Author

Just use the default prettier and we're good to go!

I'll get back to you with a link for the first version early next week. Thanks!

@ViorelMocanu
Copy link
Author

Just use the default prettier and we're good to go!

Have a look and let me know what you think, please: https://github.com/ViorelMocanu/astro-simpleanalytics-plugin (it's already published on NPM here)

@adriaandotcom
Copy link
Contributor

Thanks! Would you mind adding it to https://github.com/simpleanalytics/astro-plugin? I added you as a collaborator.

We can auto-deploy from main with something like this:

https://github.com/simpleanalytics/vue-plugin/blob/main/.github/workflows/release.yml

@ViorelMocanu
Copy link
Author

Done. Imported from the original repo after tweaking the release.yml file, allowing it to work.

  1. How should I proceed with updating it going forward?
  2. Do you have any other suggestions?
  3. Do you need me to write some Integrations docs for you?

Thanks! :)

@ViorelMocanu
Copy link
Author

@adriaanvanrossum any updates regarding the above? ^

@adriaandotcom
Copy link
Contributor

Thanks for your patience. You did an outstanding job! Wow.

I added the NPM credentials. Deploy should work now.

Should we keep it consistent with our other packages and rename it to astro-plugin-simple-analytics? I am not sure if that breaks things.

If you could make a PR at https://github.com/simpleanalytics/docs/blob/master/_docs/31_integrations/00_astro.md, that would be great. Just a simple how to use would be enough.

@ViorelMocanu
Copy link
Author

  1. Thanks, @adriaanvanrossum – it's my first Open Source contribution in a long time. It was fun, and I'm planning to extend the package even more soon to cover most of your API and features.
  2. Thanks for making the deploy work! I'll be testing it on the next update.
  3. Renaming the package should have no issues, but I'm confused whether this should impact both my own repo and yours, or just yours. If it's just yours, renaming the package into astro-plugin-simple-analytics and publishing it to NPM would create another independent NPM package, alongside the original. Not sure if that's what you want. Either way, I can make the change on either one or both repos, just let me know how you suggest we proceed with the renaming, please.
  4. Speaking of the two repos, what should I do with my old repo and the original NPM package? Should I make my repo private and keep it only for testing purposes on my end, so yours would be the one that's used going forward? Or just update both in parallel from now on (which would not be an issue at all for me)?
  5. Sure thing, I can write a simple guide on your 00_astro.md and make a PR with it right after we settle the points above.

Thanks for the reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants