npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zat-design/sisyphus-react

v3.9.1-beta.6

Published

西西弗基于 antd@4 版本开发

Downloads

5,782

Readme

快速上手

西西弗基于 antd@4 版本开发

安装

npm 或 yarn 安装

# npm
$ npm install @zat-design/sisyphus-react --save

# yarn
$ yarn add @zat-design/sisyphus-react

按需加载

采用 babel-plugin-import 方式

[
  'babel-plugin-import',
      {
        libraryName: '@zat-design/sisyphus-react',
        camel2DashComponentName:false,
        libraryDirectory: 'es',
        style: false,
      },
],

以下为在 umi 框架下配置按需加载,同时也配置 antd 的按需加载情况下,再配置一个 babel-plugin-import 时需要配置一个别名,可参考下面

 extraBabelPlugins: [
    [
      'babel-plugin-import',
      {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: true,
      },
    ],
    [
      'babel-plugin-import',
      {
        libraryName: '@zat-design/sisyphus-react',
        camel2DashComponentName:false,
        libraryDirectory: 'es',
        style: false,
      },
      '@zat-design/sisyphus-react'
    ],
  ]

使用

  1. 可通过 npm 包进行引用
import React from 'react';
import { render } from 'react-dom';
import { ProForm } from '@zat-design/sisyphus-react';

const App = () => {
  return (
    <ProForm
      columns={[
        {
          type: 'Input',
          label: '姓名',
          name: 'name',
          rules: [{ required: true, message: '请输入姓名!' }],
        }]}
    />
  );
};

render(<App />, document.getElementById('root'));
  1. 如组件无法满足业务场景使用,但大部分可复用可联系我们进行补充调整,也可以单独 copy 进行调整

组件库打包发布

  1. build:types 生成类型文件
  2. build:es 生产 es6 代码文件 module 指向该文件
  3. build:lib 生产 es5 代码文件 main 指向该文件
  4. release: "yarn build:types & yarn build:es && yarn build:lib && npm publish" 打包 3 个文件进行发布
  5. 执行 yarn build 成功
  6. 执行 yarn release

发布

npm publish --registry https://registry.npmjs.org --access=public

发布内网库

  1. package.json里增加配置
  "publishConfig": {
    "registry": "https://npm.zhonganinfo.com"
  },
  1. 之后使用 npm publish 发布, 如果提示登录使用域账号登录