saadeghi / daisyui

🌼 🌼 🌼 🌼 🌼  The most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.14k stars 1.3k forks source link

Windows compatibility #3164

Closed TheBrenny closed 3 months ago

TheBrenny commented 3 months ago

Adds a very small amount of Windows compatibility to the build script.

This now Works on My Machine™️, but hopefully it hasn't broken how the script functions on other non-Windows hosts.

vercel[bot] commented 3 months ago

@TheBrenny is attempting to deploy a commit to the Pouya Team on Vercel.

A member of the Team first needs to authorize it.

saadeghi commented 3 months ago

Thanks for the PR!
Isn't it better to use PowerShell or something similar witch supports Unix commands?

TheBrenny commented 3 months ago

Powershell still isn't the default "shell" on windows. Running commands from Node like we're doing at the moment sort of opens up cmd /C ... (forgive me for not being perfectly technical). To use Powershell, we'd need to wrap all the commands in pwsh -c ... which is also just as feasible (I don't know why I didn't think of that to begin with!). But even then, cat in Powershell is an alias to Get-Content which could change behaviour between different Powershell versions. At least type is common among all Windows versions (I think).

saadeghi commented 3 months ago

PowerShell is pre installed on Windows.
The "default" cmd.exe is not recommended for developers anyway. Just like "Notepad" the default text editor is not a good choice for writing code 😅 I mean... Isn't it better to use the right tool instead of adding OS specific if conditions to all the codebases on GitHub which are using Unix commands?

TheBrenny commented 3 months ago

Hahaha, fair enough! I'll try and whip something up real quick!