zobweyt
zobweyt
Explore posts from servers
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
ohhh, thank you very much!! I got it all now :)
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
maybe I don't understand very well why start script is needed? is it needed only for testing and preview? after moving the build to the hosting service, do I need to run the application using just node and the resulting build?
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
okay, got it however, this still remains unclear for me:
I still need Vite to run the start script, so should it remain in the regular dependencies?
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
they are using vinxi, it's vite + nitro
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
yes but it's more like a "library", not an app also, compare these examples: - https://github.com/solidjs/solid-start/blob/main/examples/bare/package.json: everything is in regular dependencies - https://github.com/solidjs/solid-start/blob/main/examples/with-vitest/package.json everything is in dev dependencies
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
I'm using Vite with Solid Start https://github.com/solidjs/solid-start
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
Should I move everything to development dependencies and then attempt to build the app with all the development dependencies installed, and then preview using the start script? I understand that the next steps may depend on the hosting environment. For example, in one scenario, would I move the build to a hosting service and only install production dependencies there? I still need Vite to run the start script, so should it remain in the regular dependencies?
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
so you are doing a build with development dependencies installed
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
but to build the app you anyway need some development dependencies
45 replies
KPCKevin Powell - Community
Created by zobweyt on 10/11/2024 in #front-end
Choosing between dependencies and dev dependencies
So building is more about development rather than production?
45 replies
KPCKevin Powell - Community
Created by zobweyt on 8/7/2024 in #front-end
Using CSS selectors with @media queries
I guess light-dark() function is suitable if you have only 2 color schemes: light and dark But it's still very cool!
7 replies
KPCKevin Powell - Community
Created by zobweyt on 8/7/2024 in #front-end
Using CSS selectors with @media queries
Didn't expect to get an answer right from you :) Thank you for your awesome videos!!
You'll need to copy paste
So a more neat solution is to use a preprocessor like SASS for this, right?
As for the data-theme="system", I wouldn't include that anywhere, so it just goes back to the default that way.
Yeah, you're right, but I'd move the @media queries upper. If you had more than 2 themes, it'd be better to do it like this:
body {
background: var(--bg);
}

@media (prefers-color-scheme: light) {
:root {
--bg: white;
}
}

@media (prefers-color-scheme: dark) {
:root {
--bg: black;
}
}

[data-theme="light"] {
--bg: white;
}

[data-theme="dark"] {
--bg: black;
}

[data-theme="third"] {
--bg: green;
}
body {
background: var(--bg);
}

@media (prefers-color-scheme: light) {
:root {
--bg: white;
}
}

@media (prefers-color-scheme: dark) {
:root {
--bg: black;
}
}

[data-theme="light"] {
--bg: white;
}

[data-theme="dark"] {
--bg: black;
}

[data-theme="third"] {
--bg: green;
}
7 replies