NPM

直接使用npm(或yarn)方式安装使用。


 1# 安装绘图引擎
 2npm  install topology-core
 3
 4# 安装图形库 - 流程图
 5npm  install topology-flow-diagram
 6
 7# 安装图形库 - 活动图
 8npm  install topology-activity-diagram
 9
10# 安装图形库 - 类图
11npm  install topology-class-diagram
12
13# 安装图形库 - 时序图
14npm  install topology-sequence-diagram
15
16# 其他共享图形库
17# ...



package.json参考示例


 1{
 2  "name": "topology-demo",
 3  "version": "0.0.1",
 4  "description": "ES6 + Babel: The demo",
 5  "main": "index.js",
 6  "scripts": {
 7    "build": "webpack"
 8  },
 9  "keywords": [
10    "es2018",
11    "webpack"
12  ],
13  "author": "alsmile123@qq.com",
14  "license": "MIT",
15  "dependencies": {
16    "topology-core": "^0.0.6",
17    "topology-activity-diagram": "^0.0.3",
18    "topology-class-diagram": "^0.0.1",   
19    "topology-flow-diagram": "^0.0.1",
20    "topology-sequence-diagram": "^0.0.3"
21  },
22  "devDependencies": {
23    "@babel/core": "^7.5.5",
24    "@babel/plugin-transform-runtime": "^7.5.5",
25    "@babel/preset-env": "^7.5.5",
26    "babel-loader": "^8.0.6",
27    "path": "^0.12.7",
28    "webpack": "^4.37.0",
29    "webpack-cli": "^3.3.6"
30  }
31}


es6使用示例:

https://github.com/le5le-com/topology-demo-es6


typescript使用示例:

https://github.com/le5le-com/topology/tree/master/src/app/home