Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme #9

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build
name: build

on:
push:
Expand All @@ -24,12 +24,21 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- run: yarn
- run: yarn build
- run: yarn test
- name: Checkout
uses: actions/[email protected]

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- name: Run ci
run: |
npm install
npm run test
npm run build
- name: coverall
if: success()
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
# Graphlib
<h1 align="center">
<b>@antv/graphlib</b>
</h1>

> a lib containing multible usages for graph structure, graph algorithm, and other graph ops.
<div align="center">

> A library containing multible usages for graph structure, graph algorithm, and other graph ops.
>
> 一个包含方便的图结构,图算法,以及其他操作图的方法的图库,为 antv 上层提供相应的图基础能力
> 一个包含方便的图结构,图算法,以及其他操作图的方法的图库,为 AntV 上层提供相应的图基础能力。

[![Build Status](https://github.com/antvis/graphlib/workflows/build/badge.svg?branch=master)](https://github.com/antvis/graphlib/actions)
[![Coverage Status](https://coveralls.io/repos/github/antvis/graphlib/badge.svg?branch=master)](https://coveralls.io/github/antvis/graphlib?branch=master)
[![npm Version](https://img.shields.io/npm/v/@antv/graphlib.svg)](https://www.npmjs.com/package/@antv/graphlib)
[![npm Download](https://img.shields.io/npm/dm/@antv/graphlib.svg)](https://www.npmjs.com/package/@antv/graphlib)
[![npm License](https://img.shields.io/npm/l/@antv/graphlib.svg)](https://www.npmjs.com/package/@antv/graphlib)

![build status](https://img.shields.io/github/workflow/status/antvis/graphlib/Build) ![coverage status](https://img.shields.io/codecov/c/github/antvis/graphlib)
</div>

## Features
## Features

- Manage graph structure data with simple APIs.
- Easily batch multiple changes for performance optimization.
- GraphView for efficient data transformation.

## API
## 📖 API

### Classes

- [Graph](docs/classes/Graph.md)
- [GraphView](docs/classes/GraphView.md)

## Change Log
## 🗂 Change Log

#### 2.0.2

Expand All @@ -28,3 +38,7 @@
#### 2.0

- 🎉 Release new version

## 📄 License

MIT@[AntV](https://github.com/antvis).
24 changes: 13 additions & 11 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"testTimeout": 30000,
"preset": "ts-jest",
"globals": {
"ts-jest": {
"tsconfig": {
"target": "esnext",
"allowJs": true,
"sourceMap": true
}
}
},
"collectCoverage": false,
"testRegex": "(/__tests__/.*\\.(test|spec))\\.ts$",
"collectCoverageFrom": [
"src/**/*.ts"
]
],
"transform": {
"^.+\\.ts$": [
"ts-jest",
{
"tsconfig": {
"target": "esnext",
"allowJs": true,
"sourceMap": true
}
}
]
}
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "@antv/graphlib",
"version": "2.0.2",
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"unpkg": "dist/index.umd.min.js",
"sideEffects": false,
"scripts": {
"clean": "rimraf lib esm dist",
Expand All @@ -16,17 +20,14 @@
"build": "run-p build:*",
"bundle-vis": "cross-env BUNDLE_VIS=1 run-p build:umd"
},
"license": "MIT",
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"unpkg": "dist/index.umd.min.js",
"dependencies": {
"@antv/event-emitter": "^0.1.3"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@rollup/plugin-commonjs": "^21.0.2",
"@rollup/plugin-node-resolve": "^15.2.1",
"@rollup/plugin-terser": "^0.4.3",
"@types/jest": "^29.2.4",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
Expand All @@ -41,14 +42,12 @@
"prettier": "^2.8.1",
"rimraf": "^3.0.2",
"rollup": "^2.39.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-polyfill-node": "^0.8.0",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-uglify": "^6.0.4",
"rollup-plugin-typescript2": "^0.35.0",
"rollup-plugin-visualizer": "^5.6.0",
"ts-jest": "^29.0.3",
"tslib": "^2.4.1",
"typedoc": "^0.23.24",
"typedoc": "^0.25.2",
"typedoc-plugin-markdown": "^3.14.0",
"typescript": "^4.9.4"
},
Expand All @@ -62,7 +61,7 @@
"limit-size": [
{
"path": "dist/index.umd.min.js",
"limit": "10 Kb",
"limit": "5 Kb",
"gzip": true
}
],
Expand All @@ -77,5 +76,6 @@
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
}
},
"license": "MIT"
}
8 changes: 4 additions & 4 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { uglify } from 'rollup-plugin-uglify';
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript';
import terser from '@rollup/plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import commonjs from '@rollup/plugin-commonjs';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import { visualizer } from 'rollup-plugin-visualizer';
Expand All @@ -21,7 +21,7 @@ export default [
resolve(),
commonjs(),
typescript(),
uglify(),
terser(),
...(isBundleVis ? [visualizer({ open: true })] : []),
],
},
Expand Down
Loading