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

套件詳情v1.0.5

pubspec_dependency_sorter

幫助將 Flutter、Dart 的 pubspec.yaml 依賴項按字母順序排序。

AndroidiOSmacOSWindowsLinux
近 30 天下載
7.2萬
喜歡數
43
Pub 分數
115

安裝套件

flutter pub add pubspec_dependency_sorter

套件介紹

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

一個用於 Flutter 和 Dart 項目的開發工具,可自動將 pubspec.yaml 檔案中的相依性按字母順序排序。它確保相依性清單整潔、一致且易於閱讀,提升可維護性並減少合併衝突。此工具設計簡潔高效,透過命令列介面無縫整合至開發工作流程中。支援所有主要平台,包括 Android、iOS、macOS、Windows 和 Linux。

適用情境

  • 保持 pubspec.yaml 檔案的整潔
  • 減少團隊環境中的合併衝突
  • 自動化依賴項組織
  • 提高專案依賴項的可讀性
  • 簡化程式碼審查流程

主要特色

  • 依賴項的字母排序
  • 命令列整合
  • 支援所有 Flutter 平台
  • 簡單且輕量
  • 保留現有結構和註釋

適合對象

  • Flutter 開發者
  • 基於團隊的專案
  • CI/CD 流水線
  • 程式碼品質自動化
  • 頻繁更新依賴項的專案

使用建議

  • 不驗證依賴項語法
  • 除非整合到腳本中,否則需要手動執行
  • 可能與其他格式化工具衝突
  • 沒有可用的設定選項
  • 僅影響 pubspec.yaml 檔案

原始 README

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

Package helps to sort the flutter/dart packages and plugins alphabetically, This makes it easier when managing too many packages and when working with teams

Features

  • sort dependencies
  • prevent dependecy conflicts
  • clean up the pubspec.yaml file

Getting started

Install flutter or dart sdk then depend on the package.

dev_dependencies:
  pubspec_dependency_sorter: ^1.0.4

Usage

To use the package run in your flutter/dart app root directory

   dart run pubspec_dependency_sorter

if your pubspec.yam is located somewhere else use the following command by passing the path of the directory where the pubspec.yaml file is located.

  dart run pubspec_dependency_sorter PATH-TO-YOUR-DIRECTORY

sample output

dependency_sorter sample output

Additional information

Feel free to add features,improvemets and fix bugs then create a PR.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

所在榜單