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

@antv/gi-assets-algorithm

v2.3.19

Published

G6VP 图分析算法资产库

Downloads

148

Readme

01 开发文档

src/components下默认约定为 GI 的组件资产,具体开发文档,参考:https://yuque.antfin.com/graphinsight/manual/xzdeb8

1.1 导出文件规范

GI 的业务资产包中对于导出文件有一个规范要求,即在src/index.tsx中,组件资产必须挂载在components下。

export {
  components:Components,
  layouts:xxx,  // 未来如果有自定义元素的资产,也可以挂载上去
  elements:xxx  // 未来如果有自定义布局的资产,也可以挂载上去
  XXXStudio:XXXGraphStduio, // 这个是业务特有的 Studio
}

02 测试文档

每个组件中,我们新增index.md文件,我们采用npm run docs命令,可以使用 dumi 渲染出来。可以参考src/components/MyComponent/index.md

2.1 使用说明

<TestSDK asset={asset} />

2.2 接口类型说明

export interface TestSDKProps {
  /** Component 组件实例 **/
  asset: {
    component: React.FunctionComponent | React.Component;
    info: {
      id: string;
      name: string;
      type: 'GI_CONTAINER' | 'GI_CONTAINER_INDEX';
    };
    registerMeta: (context: { data: any; services: any[]; GI_CONTAINER_INDEXS: string[]; keys: string[] }) => any;
  };
  /** Component 组件类型 */
  type?: 'GICC' | 'GICC_MENU' | 'GIAC' | 'GIAC_CONTENT' | 'GIAC_MENU';
  /** 自定义数据服务 */
  services: {
    id: string;
    service: () => Promise<any>;
  }[];
}

2.3 组件类型说明

  • GI_CONTAINER: 容器组件
    • GICC 普通容器组件
    • GICC_MENU 右键菜单的容器组件
    • GICC_LAYOUT 页面布局组件
  • GI_CONTAINER_INDEX 原子组件
    • GIAC 普通原子组件
    • GIAC_CONTENT 可做内容的原子组件
    • GIAC_MENU 可做菜单的原子组件

03 部署流程

3.1 打包产物

npm run build  // 本地执行产生es/ lib/ dist/ 文件
npm publish --tag beta // 使用tnpm发布到内部npm仓库,如果第一次发布,需要tnpm login 登陆

3.2 CDN 同步

访问雨燕仓库:https://yuyan.antfin-inc.com/lib/version?name=%40alipay%2Fgeamaker-graphstudio 点击同步,进行包的同步,未发布可以点击发布,这样就可以使得 GrapStudio 的产物同步到 CDN 上