搜尋套件、儲存庫與 APP 分類

dcdg 封面
套件詳情v4.1.0

dcdg

一個工具,可自動從 Dart 套件產生類別圖(例如 UML)。

AndroidiOSmacOSWindowsLinux
近 30 天下載
444
喜歡數
179
Pub 分數
120

安裝套件

flutter pub add dcdg

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

dcdg 是一個開發者工具,可自動從 Dart 套件產生類別圖(例如 UML)。它分析 Dart 程式碼的結構,以視覺化類別、它們之間的關係以及繼承層次,有助於理解複雜的程式碼庫。適用於文件編寫、入職訓練或設計審查,支援 Android、iOS、macOS、Windows 與 Linux 等多個平台。該工具透過 Flutter pub 集成,為開源專案,託管於 GitHub。

適用情境

  • 程式碼庫文件
  • 新開發人員入職
  • 設計可視化
  • 重構規劃
  • 技術文檔

主要特色

  • 自動產生UML圖
  • 支援多平台專案
  • 開源且可擴展
  • 與 Flutter pub 集成
  • 可視化類別關係

適合對象

  • Dart 開發人員
  • 團隊文件
  • 大型代碼庫
  • 軟體架構師
  • 教育用途

使用建議

  • 需要 Dart 程式碼分析
  • 輸出品質取決於程式碼結構
  • 非即時更新
  • 有限的自訂選項
  • 最適合靜態分析

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Build Status

Dart Class Diagram Generator

A small command line utility to generate a class (UML or similar) diagram from a Dart package.

Examples

Below is a UML diagram of the dcdg source code, created with dcdg. You can find the PlantUML source in the example/ directory.

Example UML Diagram

Installation

Install from pub:

dart pub global activate dcdg

Install from clone:

dart pub global activate -s path .

Usage

From inside a Dart package directory:

dart pub global run dcdg

This will dump a PlantUML file to stdout. You can save it to a file instead with the -o option.

If you'd like to create a Mermaid file instead, pass the -b option with mermaid as its argument:

dart pub global run dcdg -b mermaid

See --help for more options, including ways to filter what ends up in the output. You can find the help contents in USAGE.txt as well.

Examples

There are test fixtures in test/fixtures/. Each Dart package in this directory contains various (fake) classes. Try running DCDG against these fixtures to familiarize yourself with how it works.

Contributing

Pull requests are welcome! It is intended to be reasonably straightforward to add a new output format. Take a look at the DOT format implementation in lib/src/builders for an example.

If you have found a bug or have a feature request please open an issue.

Development

Format code using the tool/format.sh script. It will have a non-zero exit code if the formatting changed. That's fine, it does that so it can be used in CI.

Run the full test suite (including unit and functional tests) with tool/check.sh.

If you change the user interface or add features you should run tool/docs.sh to regenerate documentation and other resources. This script requires PlantUML.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。