Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
dt-react-component
Advanced tools
目的:减少代码重复率,便于新同学对组件使用以及团队内部项目的代码优化
使用 npm
npm i dt-react-component --save
import { Circle, GoBack } from 'dt-react-component'
const App = () => (
<>
<Circle />
<GoBack url='/api/manage' />
</>
);
样式引入:
import 'dt-react-component/lib/index.css'
import { Circle } from 'dt-react-component/lib/circle'
样式暂时还是必须全量引入:
import 'dt-react-component/lib/index.css'
目前这块打包出来的样式暂不支持单文件引入,这块后续有时间使用 gulp/webpack 打包单独出组件样式文件
clone & npm install
git clone ssh://git@gitlab.prod.dtstack.cn:10022/dt-insight-front/infrastructure/dt-react-component.git
npm install
启动本地服务器
npm run storybook
组件开发
静态服务部署构建
npm run build-storybook
组件发布至 npm 在按照一些列组件开发规范流程下,测试组件无问题后进行组件发布
npm run compile 输出 lib 目录
登陆 npm 执行 npm publish
这里使用 netlify 托管 storybook 静态服务 netlify 服务器检测到 push master 操作会自动执行 npm run build-storybook,生成最新的静态资源重新部署,可在 https://dtux.netlify.com/ 查看效果
1.0.0 (2020-06-15)
FAQs
react-component
The npm package dt-react-component receives a total of 14 weekly downloads. As such, dt-react-component popularity was classified as not popular.
We found that dt-react-component 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.