![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@cosmic-design/san
Advanced tools
一个基于 San 开发的 UI 组件库
目前组件库提供了多种模块化规范,及全部打包和按需引入分包的编译产物,你可以结合适合的业务场景选择。
全局提供 san 的依赖即可,编译选择 vite / rollup 等工具即可,无特别配置,可参考。
/** package.json */
{
"exports": {
"./css/*": "./dist/css/*",
/** for @cosmic-design/san/css/Button.css */
/** for @cosmic-design/san/css/style.css */
/** for @cosmic-design/san/css/global.css */
"./*": {
"import": "./dist/esm/*/index.js",
"require": "./dist/cjs/*/index.js"
},
/** for @cosmic-design/san/Button */
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}
/** for @cosmic-design/san */
},
}
/dist
├── css
│ ├── style.css # 所有样式,适用于全部引入,包括组件和global
| ├── global.css # 全局样式,适用于按需引入
| ├── Button.css # 组件样式,适用于按需引入
├── esm
│ ├── index.js # 组件esm bundle,适用于 esm/ts + 全部引入
│ ├── index.d.ts # 所有组件类型
│ ├── Button
│ │ ├── index.js # 组件esm, 适用于 esm/ts + 按需引入
│ │ ├── index.d.ts # 所有组件类型
├── cjs
│ ├── index.js # 组件commonJS bundle,适用于打包引入
│ ├── index.d.ts # 所有组件类型
│ ├── Button
│ │ ├── index.js # 组件commonJS, 适用于按需引入
│ │ ├── index.d.ts # 组件类型
├── umd
│ ├── index.js # 组件umd bundle,适用于 umd/amd + 打包引入
│ ├── Button.js # 分组件umd,适用于 umd/amd + 按需引入
import '@cosmic-design/san/css/style.css';
import { Button } from '@cosmic-design/san';
import '@cosmic-design/san/css/global.css'; // in global js
import '@cosmic-design/san/css/Button.css';
import Button from '@cosmic-design/san/Button';
全部引入 略
按需引入
/** CommonJS SSR **/
const Button = require('@cosmic-design/san/Button');
require.config({
packages: [
{
name: '@cosmic-design/san',
location: '/@cosmic-design/san/dist/es5',
main: 'index.js'
},
]
});
<link rel="stylesheet" type="text/css" href="/@cosmic-design/san/dist/css/style.css"/>
require(['@cosmic-design/san', 'san'], function({ Button }, { Component }) {
});
<link rel="stylesheet" type="text/css" href="/@cosmic-design/san/dist/css/global.css"/>
<link rel="stylesheet" type="text/css" href="/@cosmic-design/san/dist/css/Button.css"/>
require(['@cosmic-design/san/Button', 'san'], function(Button, { Component }) {
});
./packages/components
Grid
/Button
组件./site
npm run build
使用 san-test-utils 进行单元测试
请使用npm run commit
,不要使用git commit
FAQs
一个基于 San 开发的 UI 组件库
The npm package @cosmic-design/san receives a total of 125 weekly downloads. As such, @cosmic-design/san popularity was classified as not popular.
We found that @cosmic-design/san demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.