
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@pitrix/lego-ui
Advanced tools
React & CSS UI Framework.
npm install @pitrix/lego-ui --save
import { LocaleProvider, Button } from '@pitrix/lego-ui';
import { Locales } from './locales';
const App = () => (
<LocaleProvider locales={locales}>
<Button>Button</Button>
</LocaleProvider>
);
ReactDOM.render(<App />, mountNode);
lego-ui 部分组件有使用
locale,LocaleProvider默认会加载 lego-ui 的本地化文件,你也可以在你的项目中使用,只需要自定你的locales, 关于国际化请查看 LocaleProvider。
如果没有定制需求,可以直接引入 css 样式文件:
import '@pitrix/lego-ui/lib/scss/lego-ui.min.css';
或者引入 scss 样式文件:
import '@pitrix/lego-ui/lib/scss/index.scss';
这样可以直接使用 lego-ui 的默认主题样式。
lego-ui 设计规范上支持一定程度的样式定制,以满足不同产品的多样化视觉需求,包括但不限于主色、圆角、边框和部分组件的视觉定制。
建立一个单独的 scss 文件如下,然后再引入这个文件:
// 引入默认主题
@import '~@pitrix/lego-ui/lib/scss/themes/default';
// 引入 SVG 图标组件的样式
@import '~@pitrix/lego-ui/lib/scss/base/icon';
// 在这里定义你要覆盖的变量
// $primary: blue;
// $button-color: #ccc;
// 引入核心的 Bulma 样式与组件样式
@import '~@pitrix/lego-ui/lib/scss/core.scss';
|-- build/ _____________________ # 构建脚本
|-- config/ _____________________ # 构建环境配置
|-- dist/ _____________________ # 文档站点构建输出目录
|-- lib/ _____________________ # npm 发布代码目录
|-- mock/ _____________________ # mock 脚本
|-- site/ _____________________ # 文档站点
| |-- assets/ _____________________ # 静态资源文件
| |-- layout/ _____________________ # 页面布局
| |-- pages/ _____________________ # 文档内容
| |-- routes/ _____________________ # 站点路由
| |-- scss/ _____________________ # 样式文件
|-- src/ _____________________ # 源码
| |-- assets/ _____________________ # 静态资源文件
| |-- components/ _____________________ # 组件源码
| |-- locales/ _____________________ # 本地化文件
| |-- scss/ _____________________ # 样式
| `-- utils/ _____________________ # 工具类
|-- static/ _____________________ # 静态资源
# 运行本地开发服务,默认端口 3000
npm run dev
# 构建文档站点
npm run build
# 代码检查
npm run lint
# js,jsx, markdown 文件代码检查
npm run eslint
# scss 文件代码检查
npm run stylelint
# 代码格式化
npm run formatter
# 构建 npm 发布需要的代码
npm run build:lib
# 单独构建 scss 文件
npm run build:sass
# 单独构建 icon
npm run build:icon
# 构建 版本的 badge 图标
npm run build:badge
# 发布新版
npm run release
如需要向图标库中添加图标
/src/assets/icons/objectnpm run build:icon;site/pages/docs/components/icon.md⚠️ 注意:svg 图片大小、颜色(#324558)。
Commit Message 需要遵循以下格式:
type(scope?): subject #scope is optional
其中:
提交的过程中会做 eslint 检查,不通过则不能提交。
标准版本:
npm run release
qnpm publish
构建发布到仓库中所需的文件,standard-version 会生成 changelog,打上 tag 并提交 commit;
你也可以指定版本
qnpm run release -- --release-as 1.1.0
预发布版本:
预发布版本不希望生成 changelog, 所以可以在 package.json 中 手动调整版本号,例如 0.1.5-xx,发布时需要指定 tag 为 next。
qnpm publish --tag=next
http://172.16.60.3:8080/view/f2e/job/lego-ui/
FAQs
QingCloud UI Component
We found that @pitrix/lego-ui demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.