Skip to content

Conversation

@sentsim
Copy link
Contributor

@sentsim sentsim commented Nov 13, 2025

Hi, I’ve updated some details in layui.json to align with the Layui 3 release. (resolves #2082)

Additionally, I’d like to report an issue:
Layui released versions 2.12.1 and 2.13.0 last month, but cdnjs still lists version 2.12.0:

Please check why the newer versions haven’t been updated automatically. Thanks!

@MattIPv4
Copy link
Member

Additionally, I’d like to report an issue:
Layui released versions 2.12.1 and 2.13.0 last month, but cdnjs still lists version 2.12.0:

cdnjs/cdnjs#14263 (comment)

Comment on lines 23 to 24
"**/*.@(js|css|map)",
"font/*.@(eot|woff2)"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"**/*.@(js|css|map)",
"font/*.@(eot|woff2)"
"{,components/,core/}*.js?(.map)",
"css/*.css?(.map)",
"font/*.@(eot|ttf|svg|woff|woff2)"

Looking at https://www.npmjs.com/package/layui/v/3.0.0-alpha.0?activeTab=code, I think we can keep this a lot more similar to what we had before, avoiding needing to use a globstar

Copy link
Contributor Author

@sentsim sentsim Dec 8, 2025

Choose a reason for hiding this comment

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

Thanks for the suggestion.

However, I believe the proposed patterns would impose significant constraints on the dist directory structure. Layui 3.0 is still in its alpha stage, and its published directory layout may change at any time. For example, if JavaScript files are later moved into dist/js/, the pattern "{,components/,core/}*.js?(.map)" would no longer work. Given that Layui’s project structure is similar in nature to Bootstrap, I still think using a more flexible pattern such as "**/*.@(js|css|map)" is more appropriate. The dist folder does not contain unnecessary files, and all JavaScript, CSS, and source map files within it are intended for CDN distribution.

As for "font/*.@(eot|woff2)", this is mainly to maintain compatibility with the 2.x release line; supporting just eot and woff2 is sufficient.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not really willing to accept a globstar pattern, we avoid accepting those in configs as they can result in files being included on the CDN down the road that are not expected.

Copy link
Contributor Author

@sentsim sentsim Dec 8, 2025

Choose a reason for hiding this comment

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

I understand your concern 👍
However, Layui is a Web UI component library similar in nature to Bootstrap, which means that all JavaScript, CSS, and source map files published under the dist directory are intentional and expected assets.

If you still prefer not to accept a globstar pattern, I respect that decision. Just note that if the directory structure changes in future releases, we will need to submit another PR to update the patterns, whereas a pattern like "**/*.@(js|css|map)" would avoid repeated updates and remain valid long-term.

Copy link
Member

Choose a reason for hiding this comment

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

Bootstrap is not a good example here, I'd much rather that config also didn't contain globstars.

I'd be willing to accept {,*/}*.@(js|css|map), so that we're only accepting one level deep of wildcard directories.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great! I think {,*/}*.@(js|css|map) is a perfectly acceptable compromise. Many thanks.
I’ll submit an update shortly.

@MattIPv4 MattIPv4 merged commit d33a5ae into cdnjs:master Dec 15, 2025
1 check passed
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.

Update: layui

2 participants