bwu_grinder_tasks 0.1.1-dev.7

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 74

BWU Grinder Tasks

Star this Repo Pub Package Build Status Coverage Status

A set of common reusable Grinder tasks.

Usage

Simplest case

Add a dependency to the packages grinder and bwu_grinder_tasks to your dependencies in pubspec.yaml and add the file tool/grind.dart with the following content to your project:

export 'package:bwu_grinder_tasks/bwu_grinder_tasks.dart';

Then you can run it from your project root directory with

grind
# or
grind check
# or
grind format
# ...

Customize (hide tasks)

If you just want to use a few of the tasks but not all you can hide tasks you don't want to use and also add your own tasks. The following example suppresses browser tests. If you want to customize the tasks, you always need to implement your own main() method (and hide the provided main()).

library bwu_dart_archive_downloader.tool.grind;

export 'package:bwu_utils_dev/grinder/default_tasks.dart' hide main, lint, check, 
    travis;
import 'package:bwu_utils_dev/grinder/default_tasks.dart' show grind;

main(List<String> args) {
  grind(args);
}

@Task('some task')
some() => print('did something');

What doesn't work is to hide a task which is a dependency for another task. You also need to hide the task which depends on the task you want to hide. In the example above we hide the lint task and also need to hide check and travis which depend on lint.

Customize (provide custom implementation)

Instead of hiding and reimplementing a task you can just assign a custom implementation to a task.

The provided tasks are split in three parts.

  • The delaration with the @Task(), @DefaultTask and @Depends() annotation,
  • A variable which is referenced by a task and itself references the implementation of the task.
  • The implementation of a task
@Task('Run lint checks')
lint() => lintTask();
Function lintTask = lintTaskImpl;
lintTaskImpl() => new PubApp.global('linter')
    .run(['--stats', '-ctool/lintcfg.yaml']..addAll(existingSourceDirs));

If you want to change or extend the behavior of the lint task you can do this like:

library bwu_dart_archive_downloader.tool.grind;

export 'package:bwu_utils_dev/grinder/default_tasks.dart' hide main;
import 'package:bwu_utils_dev/grinder/default_tasks.dart'
    show grind, lintTask, lintTaskImpl;

main(List<String> args) {
  lintTask = () {
    print('before linting');
    testTaskImpl(['vm']);
    print('after linting');
  grind(args);
}

Changelog

0.1.1

  • add writeVersionInfoFile task to create a lib/src/version_info.dart file providing the package version as constant.
  • add runPubServe option to the test task implementation that runs a pub serve instance when true is passed.
  • the analyze task now uses Grinders Analyzer.analyze() instead of running tuneup.
  • the test task doesn't use vm and content-shell as default anymore. Use dart_test.yaml instead to configure which tests to run. See https://github.com/dart-lang/test/blob/master/doc/configuration.md for details.
  • update to Grinder 0.8.0
  • fix strong-mode warnings

0.1.0

  • move Grinder tasks from bwu_utils_dev
  • remove direct dependency on bwu_archive_downloader and use pub global run instead.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  bwu_grinder_tasks: "^0.1.1-dev.7"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:bwu_grinder_tasks/bwu_grinder_tasks.dart';
  
Version Uploaded Documentation Archive
0.1.0 Jun 15, 2015 Go to the documentation of bwu_grinder_tasks 0.1.0 Download bwu_grinder_tasks 0.1.0 archive
0.1.1-dev.7 Apr 13, 2017 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.7 Download bwu_grinder_tasks 0.1.1-dev.7 archive
0.1.1-dev.5 Feb 4, 2017 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.5 Download bwu_grinder_tasks 0.1.1-dev.5 archive
0.1.1-dev.4 Feb 4, 2017 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.4 Download bwu_grinder_tasks 0.1.1-dev.4 archive
0.1.1-dev.3 Apr 14, 2016 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.3 Download bwu_grinder_tasks 0.1.1-dev.3 archive
0.1.1-dev.2 Apr 9, 2016 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.2 Download bwu_grinder_tasks 0.1.1-dev.2 archive
0.1.1-dev.1 Nov 13, 2015 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.1 Download bwu_grinder_tasks 0.1.1-dev.1 archive
0.1.1-dev.0 Jul 14, 2015 Go to the documentation of bwu_grinder_tasks 0.1.1-dev.0 Download bwu_grinder_tasks 0.1.1-dev.0 archive

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
56 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80 / 100
Overall score:
Weighted score of the above. [more]
74
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Primary library: package:bwu_grinder_tasks/bwu_grinder_tasks.dart with components: io.

Suggestions

  • Package is getting outdated.

    The package was released 61 weeks ago.

  • Package is pre-release.

    Pre-release versions should be used with caution, their API may change in breaking ways.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use bwu_grinder_tasks.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Strong-mode analysis of lib/src/pub_serve.dart gave the following hint:

    line: 45 col: 57
    'SIGTERM' is deprecated and shouldn't be used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0
grinder ^0.8.0 0.8.2
path ^1.4.1 1.6.1
pub_semver ^1.3.2 1.4.1
yaml ^2.1.12 2.1.14
Transitive dependencies
async 2.0.7
charcode 1.1.1
cli_util 0.1.3
collection 1.14.10
glob 1.1.5
source_span 1.4.0
string_scanner 1.0.2
Dev dependencies
pub_server ^0.1.1+3
test ^0.12.0