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

Missing Minified CSS File in NPM Package #1076

Closed
iansantagata opened this issue Nov 3, 2021 · 7 comments · Fixed by #1684
Closed

Missing Minified CSS File in NPM Package #1076

iansantagata opened this issue Nov 3, 2021 · 7 comments · Fixed by #1684
Labels
enhancement New feature or request

Comments

@iansantagata
Copy link

Problem

As a user of Bootstrap-Icons, I would like to be able to utilize the same minified file from the npm package that I can from the CDN.

I would like to utilize a minified file, such as bootstrap-icons.min.css in the latest npm package. I am interested in this minified file in particular in order to better control dependency upgrading and visibility by being transparent about the dependencies of my application and users of my application.

The CDN has a minified version of the file that can be utilized, but the npm package does not. It would be great if the npm package of bootstrap-icons could also include a bootstrap-icons.min.css file like the CDN does through jsdelivr.

References

Example file here on the CDN - https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css

@mdo
Copy link
Member

mdo commented Nov 3, 2021

jsDelivr is powered by npm I believe, and our package.json specifies the contents of the font directory:

icons/package.json

Lines 65 to 70 in ad24b6f

"files": [
"icons/*.svg",
"bootstrap-icons.svg",
"font",
"!.DS_Store"
],

@mdo mdo closed this as completed Nov 3, 2021
@iansantagata
Copy link
Author

@mdo - I'm not quite sure I follow your point.

I opened this issue because there is no minified version of the JS and CSS files available within the font directory in the npm package for bootstrap-icons. I am wondering why not and if there are plans to create such files. Your response does not help me answer that question.

As a related note, in similar packages, like bootstrap, there exists a minified version of almost every file, as is mentioned and visible here:

Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.

Package - https://www.npmjs.com/package/bootstrap

Are there any plans to create such minified files similarly in bootstrap-icons? I know I would certainly use them if provided.

(I don't think this should be tagged as bug, but I couldn't change the tag. Sorry about that.)

@mdo
Copy link
Member

mdo commented Nov 4, 2021

Oh my bad, I didn't realize jsDelivr was generating that. I think we can add this.

@mdo mdo reopened this Nov 4, 2021
@mdo mdo added enhancement New feature or request and removed bug Something isn't working labels Nov 5, 2021
@rabinadk1
Copy link

A friendly ping to the developers.

@XhmikosR
Copy link
Member

There's no real gain in minifying the CSS file, the numbers are just too small. We might revisit later but for now we won't do it.

@XhmikosR
Copy link
Member

XhmikosR commented Apr 5, 2023

I made #1684, but like I said above, the gains are pretty small after gzip/brotli; no need to downvote when it's a fact 😛.

Here are the numbers:

Uncompressed:

  • unminified: 93.73 KB
  • minified: 81.93 KB
  • diff: -12.59%

Brotli:

  • unminified: 12.42 KB
  • minified: 12.26 KB
  • diff: -1.29%

Sure, the uncompressed size is decreased significantly, but no one should serve uncompressed files on the web.

@twbs twbs deleted a comment from CZMrBread Apr 5, 2023
@rabinadk1
Copy link

I made #1684, but like I said above, the gains are pretty small after gzip/brotli; no need to downvote when it's a fact stuck_out_tongue.

Here are the numbers:

Uncompressed:

  • unminified: 93.73 KB
  • minified: 81.93 KB
  • diff: -12.59%

Brotli:

  • unminified: 12.42 KB
  • minified: 12.26 KB
  • diff: -1.29%

Sure, the uncompressed size is decreased significantly, but no one should serve uncompressed files on the web.

Seems like it is overkill for the brotli compression

@github-project-automation github-project-automation bot moved this from In Progress to Done in Icons v1.11.0 Apr 26, 2023
@XhmikosR XhmikosR removed this from Icons v1.11.0 Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
4 participants