chore: Add example of env usage to wxt-demo#2108
chore: Add example of env usage to wxt-demo#2108PatrykKuniczak wants to merge 1 commit intowxt-dev:mainfrom
env usage to wxt-demo#2108Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…e of usage to `wxt-demo`
d9908e8 to
049a480
Compare
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2108 +/- ##
==========================================
- Coverage 76.11% 76.08% -0.04%
==========================================
Files 113 113
Lines 3027 3027
Branches 679 679
==========================================
- Hits 2304 2303 -1
Misses 640 640
- Partials 83 84 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
OH EACH tests. |
aklinker1
left a comment
There was a problem hiding this comment.
This is "runtime config", not "env".
That said, what is the meaningful change this PR adds? We're already logging the runtime config on line 16 of the background script, and there's plenty of examples of env vars via import.meta.env.
In other words, what did you add that wasn't already there?
I like cleaning up all the duplicate logs for the extension ID, that can stay for sure.
As for uppercasing EXAMLE, regular camel case is convention for runtime config property names. Notice how none of vite's or wxt's config are snake case - runtime config is the same. You can upper case it if you want in your own projects, but WXT's docs and examples need to be consistent.
|
I don't want to waste your time, so let me be clear about these refactors: they need to have a valid reason behind a change. If you're just shuffling code around, or adjusting format/whitespace according to your own opinion, or trying to change the entire project's standards (like uppercasing tons of variables in tests), I'm not going to approve those changes. They're not meaningful changes that makes the codebase better. Like I said, I have lax linting rules, so if you're changing style just because you like it better, but it was already passing lint... What's the point? According to the repo's rules, the code was valid before. I'm open to large refactors, but ask permission first so we don't waste each other's time, be comprehensive, and understand the code you're making changes to. For example this PR:
I apologize if I seem up-tight about this and generally against some of your PRs and comments - but you did come in and make sweeping changes, introduced bugs, and changed standards I already had set in one massive PR that was too large to review. Your second PR around refactoring the docs also changed a lot of things, mixing in CSS cleanup, formatting changes, and bug fixes. So hopefully you can see things from my point of view, that I'm a bit cautious of your refactor PRs at this point - I don't view them as safe to merge, and it's taking a ton of my time to review them. I'm not saying there aren't code quality improvements to be made - you saw my 10 PRs I pulled out from your PR. They were good changes, and I made sure to add you as a co-author on all of them. If you read their descriptions, I explain why I decided each on was valid. Other than one off changes I missed... I don't want to merge any of your original refactor PR. It seemed like you just had an InteliJ editor auto-fix a bunch of stuff with no context of the project... To finish things up: I am excited to be working with you and want you to be motivated to contribute. I think a better way of onboarding you into the project and get used to working with me would be to work on some feature requests instead of refactors. Build something with immediate value, get used to the codebase's existing style so you have a better understanding of what is inconsistent or what could be cleaned up in a minimal but useful way. So, with that in mind, could you work on #1029? It would be a killer feature to have in WXT 👊 |
Yeah, that was late late night, and i've recognized it today, after i've woke up, and |
|
@aklinker1 I've missed this |
Pull request was closed
Don't apologize, that's your project, i'm some kind of impostor here, and only person, which can apologize is me, because i'm wasting your time, not opposite. |
I preffer to take one of |
|
@aklinker1 I'm able to close work on current PRs, including new one with new types(If you'll be interested) After this week i'll pick one old bug issue or sth like that and i'll try to solve it in free time, i hope you'll like this :) |
|
A bug is a good place to start as well! Thanks for understanding.
🤷 I remember a few changes that would be valuable, if you're confident, go ahead and open a PR. |
Overview
I've added a little example, how to use
envin code, herebackgroundwas usedI want to add this, because it can be quicker to take a look in code(during initial run, e.g as a new maintainer), than checking it in
docs:)