पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.10.2

grinder

Grinder डार्ट के लिए एक कार्य रनर है, जो सामान्य प्रोजेक्ट वर्कफ्लो को परिभाषित और स्वचालित करने में मदद करता है।

macOSWindowsLinux
30-दिन डाउनलोड
1.2 लाख
लाइक
116
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add grinder

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

ग्राइंडर डार्ट के लिए एक टास्क रनर है जो सामान्य प्रोजेक्ट वर्कफ्लो को स्वचालित करने में सुविधा प्रदान करता है, जैसे कि परीक्षण, निर्माण और कोड उत्पादन। यह डार्ट स्क्रिप्ट में पुन: उपयोगी कार्यों को परिभाषित करने की अनुमति देता है, जिससे टीमों के बीच विकास प्रक्रियाओं को मानकीकृत और सुगम बनाना आसान हो जाता है। macOS, Windows और Linux पर क्रॉस-प्लेटफॉर्म निष्पादन के समर्थन के साथ, ग्राइंडर डार्ट और फ्लटर प्रोजेक्ट में बिना किसी बाधा के एकीकृत हो जाता है। इसकी स्पष्ट वाक्य रचना और विस्तारशील डिज़ाइन के कारण इसे जटिल बिल्ड पाइपलाइन को न्यूनतम ओवरहेड के साथ प्रबंधित करने के लिए आदर्श बनाता है।

उपयोग

  • बिल्ड प्रक्रियाओं को स्वचालित करना
  • परीक्षण और कोड जाँच चला रहे हैं
  • रिलीज वर्कफ़्लो का प्रबंधन
  • बॉयलरप्लेट कोड जनरेट करना
  • CI/CD पाइपलाइन को सरल बनाना

मुख्य विशेषताएँ

  • डार्ट-आधारित कार्य परिभाषाएँ
  • क्रॉस-प्लेटफॉर्म संगतता
  • विस्तारयोग्य कार्य प्रणाली
  • Flutter और Dart प्रोजेक्ट्स के साथ एकीकृत
  • कमांड-लाइन निष्पादन का समर्थन करता है

इनके लिए उपयुक्त

  • Dart और Flutter विकासकर्मी
  • स्थिर कार्य प्रवाह की आवश्यकता वाली टीमें
  • CI/CD पाइपलाइन सेटअप
  • प्रोजेक्ट रखरखाव कर्मी

विचार योग्य बातें

  • Dart स्क्रिप्टिंग की समझ आवश्यक है
  • सीमित गुआई इंटरफेस
  • कमांड-लाइन वातावरण के लिए सबसे उपयुक्त
  • जटिल वर्कफ़्लो के लिए अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता हो सकती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Dart pub package

Dart workflows, automated.

Grinder consists of a library to define project tasks (e.g. test, build, doc) and a command-line tool to run them.

Getting Started

To start using grinder, add it to your dev_dependencies.

Defining Tasks

Tasks are defined entirely by Dart code allowing you to take advantage of the whole Dart ecosystem to write and debug them. Task definitions reside in a tool/grind.dart script. To create a simple grinder script, run:

dart run grinder:init

In general, grinder scripts look something like this:

import 'package:grinder/grinder.dart';

main(args) => grind(args);

@DefaultTask('Build the project.')
build() {
  log("Building...");
}

@Task('Test stuff.')
@Depends(build)
test() {
  new PubApp.local('test').run([]);
}

@Task('Generate docs.')
doc() {
  log("Generating docs...");
}

@Task('Deploy built app.')
@Depends(build, test, doc)
deploy() {
  ...
}

Any task dependencies (see @Depends above), are run before the dependent task.

Grinder contains a variety of convenience APIs for common task definitions, such as PubApp referenced above. See the API Documentation for full details.

Running Tasks

First install the grind executable:

pub global activate grinder

then use it to run desired tasks:

grind test
grind build doc

or to run a default task (see @DefaultTask above):

grind

or to display a list of available tasks and their dependencies:

grind -h

You can also bypass installing grind and instead use pub run grinder.

Passing parameters to tasks

In order to pass parameters to tasks from the command-line, you query the TaskArgs instance for your task invocation. For example:

grind build --release --mode=topaz

and:

@Task()
build() {
  TaskArgs args = context.invocation.arguments;
  bool isRelease = args.getFlag('release'); // will be set to true
  String mode = args.getOption('mode'); // will be set to topaz
  
  ...
}

would pass the flag release and the option mode to the build task.

You can pass flags and options to multiple tasks. The following command-line would pass separate flags and options to two different tasks:

grind build --release generate-docs --header=small

Disclaimer

This is not an official Google product.

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 5 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट