패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.16.0

cli_pkg

Dart CLI 패키지를 릴리스하기 위한 Grinder 작업.

macOSWindowsLinux
30일 다운로드
7.6만
좋아요
23
Pub 점수
110

패키지 설치

flutter pub add cli_pkg

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

cli_pkg는 명령줄 인터페이스(CLI) 패키지의 배포 프로세스를 간소화하기 위해 설계된 Dart 패키지입니다. 버전 관리, 테스트 및 릴리스 노트 생성과 같은 일반적인 배포 워크플로우를 자동화하는 Grinder 작업을 제공합니다. sass-lang.com에서 개발하고 GitHub에 호스팅되어 있으며, macOS, Windows, Linux를 지원하여 크로스 플랫폼 CLI 도구를 유지 관리하는 개발자에게 이상적입니다. Flutter와 Dart 생태계와 원활하게 통합되어 패키지 배포 시 수동 단계를 줄여줍니다.

사용 사례

  • CLI 패키지 배포 자동화
  • CLI 프로젝트에서 버전 관리하기
  • 릴리스 노트 생성
  • 크로스 플랫폼 CLI 개발
  • CI/CD 파이프라인 간소화

주요 기능

  • 사전 정의된 Grinder 작업
  • 버전 증가 자동화
  • 릴리스 노트 생성
  • 크로스 플랫폼 지원
  • Dart pub와의 통합

적합한 대상

  • Dart CLI 도구 유지보수자
  • 오픈소스 패키지 출판사
  • CI/CD 파이프라인 통합 업체
  • Grinder를 사용하는 개발자
  • 자주 출시하는 팀 관리

고려 사항

  • 그라인더 설정이 필요합니다
  • CLI 패키지 워크플로우에 한정
  • 릴리스 워크플로우에 GitHub에 의존
  • 비 CLI 패키지에 적합하지 않습니다
  • 사용자 정의 릴리스 로직을 위해 수동 구성이 필요합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Dart CLI Packager

This package provides a set of Grinder tasks that make it easy to release a Dart command-line application on many different release channels, to Dart users and non-Dart users alike. It also integrates with Travis CI to make it easy to automatically deploy packages.

To use this package, import package:cli_pkg/cli_pkg.dart and call pkg.addAllTasks() before calling grind():

import 'package:cli_pkg/cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {
  pkg.addAllTasks();
  grind(args);
}

The following sets of tasks are provided, each of which can also be enabled individually:

It's strongly recommended that this package be imported with the prefix pkg.

Configuration

This package is highly configurable, using ConfigVariable fields defined at the top level of the library. By default, it infers as much configuration as possible from the package's pubspec, but almost all properties can be overridden in the main() method:

import 'package:cli_pkg/cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {
  pkg.name.value = "bot-name";
  pkg.humanName.value = "My App";

  pkg.addAllTasks();
  grind(args);
}

ConfigVariables whose values are expensive to compute or that might fail under some circumstances can also be set to callback functions, which are called lazily when the variables are used by the Grinder tasks:

import 'package:cli_pkg/cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {
  pkg.githubReleaseNotes.fn = () => File.read("RELNOTES.md");

  pkg.addAllTasks();
  grind(args);
}

Each task describes exactly which configuration variables it uses. Configuration that just applies to one set of tasks is always prefixed with a corresponding name. For example, pkg.jsFlags applies to JavaScript compilation.

카테고리

의존성

의존성 목록 25 개

소스 저장소

이 패키지를 사용하는 프로젝트