1 Star 0 Fork 0

sweeter/jetlinks-ui-components

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index-style-only.js 821 Bytes
一键复制 编辑 原始数据 按行查看 历史
xieyonghong 提交于 2023-02-17 18:14 +08:00 . update: 优化打包
function pascalCase(name) {
return (
name.charAt(0).toUpperCase() +
name.slice(1).replace(/-(\w)/g, (m, n) => n.toUpperCase())
);
}
// Just import style for https://github.com/ant-design/ant-design/issues/3745
const req = require.context(
'./components',
true,
/^\.\/[^_][\w-]+\/style\/index\.tsx?$/,
);
req.keys().forEach((mod) => {
let v = req(mod);
if (v && v.default) {
v = v.default;
}
const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/);
if (match && match[1]) {
if (match[1] === 'message' || match[1] === 'notification') {
// message & notification should not be capitalized
exports[match[1]] = v;
} else {
exports[pascalCase(match[1])] = v;
}
}
});
module.exports = exports;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sweeter-open/jetlinks-ui-components.git
git@gitee.com:sweeter-open/jetlinks-ui-components.git
sweeter-open
jetlinks-ui-components
jetlinks-ui-components
master

搜索帮助