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: improve css handling #617

Merged
merged 1 commit into from
Aug 29, 2023
Merged

feat: improve css handling #617

merged 1 commit into from
Aug 29, 2023

Conversation

shadows-withal
Copy link
Contributor

@shadows-withal shadows-withal commented Aug 28, 2023

Ref: #610.

Changes the logic in the build.rs to allow for a more flexible way of controlling how CSS should be built. Most importantly, this reverts the behaviour where oranda would download a Tailwind binary on build - this functionality is now hidden behind an environment variable. You can now control how CSS is built via the following ways:

  • Set ORANDA_USE_TAILWIND_BINARY to build CSS at runtime (in development), or at build time (in release mode)
  • Prebuild the CSS using npm run build in oranda-css/, and on the next build, oranda will embed the built CSS file into the binary.
  • If you do neither of these, oranda will now fall back to fetching from GitHub releases.

Breaking changes

Distributors that would previously rely on Tailwind to build CSS for embedding into the binary now need to prebuild CSS using npm run build, or they need to use their own Tailwind binary to produce a oranda-css/dist/oranda.css file.

TODO

  • Update comments in css.rs
  • Create new docs page for building oranda, explain in detail the different build cases
  • Update contributing docs with new instructions
  • Re-add package.json

@shadows-withal shadows-withal force-pushed the feat/better-css-gen branch 2 times, most recently from 324757f to 9e7bcb5 Compare August 28, 2023 15:44
@shadows-withal shadows-withal marked this pull request as ready for review August 28, 2023 17:05
@shadows-withal shadows-withal force-pushed the feat/better-css-gen branch 3 times, most recently from 138c341 to 35d9a3b Compare August 28, 2023 17:21
@shadows-withal shadows-withal merged commit a9cd190 into main Aug 29, 2023
7 checks passed
@shadows-withal shadows-withal deleted the feat/better-css-gen branch August 29, 2023 08:21
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

Successfully merging this pull request may close these issues.

None yet

1 participant