coreui / coreui-icons

CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
https://coreui.io/icons/
Other
1.97k stars 153 forks source link

Flag variable names are uppercase, but SVG files are lowercase #21

Open jaydiablo opened 4 years ago

jaydiablo commented 4 years ago

As the title describes, the variables in the SCSS for the flag icons are in uppercase:

https://github.com/coreui/coreui-icons/blob/master/scss/flag/_variables.scss#L3

But the SVG files are in lowercase:

https://github.com/coreui/coreui-icons/tree/master/svg/flag

This results in this error when trying to transpile the SCSS to CSS:

Syntax Error: ModuleNotFoundError: Module not found: Error: Can't resolve '../svg/flag/cif-AD.svg' in '/project/node_modules/@coreui/icons/scss/flag'

Changing the variables to lowercase fixed this for me.

Letrab commented 4 years ago

Same here, build error... Does not matter on MacOS/Windows, which have case-insensitive file system, but does matter on Unix builds (Ubuntu e.g.).

jaydiablo commented 4 years ago

Yes, good point, this was on a linux OS.

Letrab commented 3 years ago

@mrholek @woothu any update on this one (for icons PRO) please? It is breaking my CI/CD builds on Unix...

Or do you accept PRs? Happy to contribute!

oulasri commented 3 years ago

Hi, any update ?

sideshowcecil commented 3 years ago

We are also running into this issue, so we have setup the following small script to make our CI/CD builds work:

for src in node_modules/@coreui/icons/svg/flag/*; do
  dst=$(echo "$src" | sed -E "s/(.*)\/cif-(.+?)\.svg/\1\/cif-\U\2\E.svg/")
  if [ "${src}" != "${dst}" ]; then
    # rename the file if something has changed
    mv "$src" "$dst"
  fi
done

Would be nice to have that fixed so we can get rid of this :)

mrholek commented 3 years ago

@jaydiablo @Letrab @oulasri @sideshowcecil I fixed it in the latest release, can you check if this release is ok?

sideshowcecil commented 3 years ago

@mrholek the new release 2.0.0-rc.0 is not available for @coreui/icons-pro.

When switching to the free version and the new release I still get the following error:

ERROR in ./node_modules/@coreui/icons/css/all.min.css (./node_modules/css-loader/dist/cjs.js??ref--13-1!./node_modules/postcss-loader/src??embedded!./node_modules/@coreui/icons/css/all.min.css)
Module Error (from ./node_modules/postcss-loader/src/index.js):
(Emitted value instead of an instance of Error) CssSyntaxError: [redacted]/css/all.css:6408:20: Can't resolve '../svg/flag/cif-ZW.svg' in '[redacted]/node_modules/@coreui/icons/css'

  6406 | 
  6407 | .cif-zw {
> 6408 |   background-image: url(../svg/flag/cif-ZW.svg);
       |                    ^