Skip to content

Conversation

@Jeremy-Walton
Copy link
Member

Why?

Even though the dist folder includes an optics.min.css, it wasn't actually minified. It was just a combined output.

What Changed

  • Change the default dist/optics.css to be a combined file since it doesn't need to be multiple.
  • Change the dist/optics.min.css to actually be minified.
  • Accomplish this using cssnano
  • Ensure dist folder only includes necessary files. In this case, LICENSE, README.md, and package.json

Sanity Check

  • [ ] Have you updated any usage of changed tokens?
  • [ ] Have you updated the docs with any component changes?
  • [ ] Have you updated the dependency graph with any component changes?
  • Have you run linters?
  • Have you run prettier?
  • Have you tried building the css?
  • Have you tried building storybook?
  • Do you need to update the package version? (Bumped to v2.1.1)

Screenshots

Screenshot 2025-03-10 at 9 30 39 PM

Screenshot 2025-03-10 at 9 35 33 PM

@Jeremy-Walton Jeremy-Walton self-assigned this Mar 11, 2025
Copy link
Collaborator

@scriswell scriswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jeremy-Walton This seems to have added quite a few package dependancies, along with some new postCSS elements. I don't have the familiarity for most of these to give a complete review so I thought I would just ask the question.

@Jeremy-Walton
Copy link
Member Author

Jeremy-Walton commented Mar 11, 2025

@scriswell Correct it does, but they are development dependencies that are just used in the final build step for distribution. They are not included in the outputted package and not used by anyone consuming the package.

The main goal of them was to update the build step to actually minify the code for distribution. That screenshot above is what the actual code output for people using the package looks like.

@Jeremy-Walton Jeremy-Walton merged commit 6eb0afe into main Mar 11, 2025
1 check passed
@Jeremy-Walton Jeremy-Walton deleted the minify-css branch March 11, 2025 13:30
@Jeremy-Walton Jeremy-Walton added Cleanup Clean up styles Simplification Repository Change Changes to the repository that don't affect the package code labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cleanup Clean up styles Repository Change Changes to the repository that don't affect the package code Simplification

Development

Successfully merging this pull request may close these issues.

4 participants