ghooks 0.0.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

dart ghooks

A library to easily use git hooks from Dart

Install

To start using ghooks, add it to your dev_dependencies and run pub get

To install hooks in your project, run:

$ pub run ghooks install
    

Add your hook to pubspec.yaml

Example:

    ghooks:
        pre-commit: ./lint.sh && ./test.sh

Install options

Option/Flagabbreviationdescription
--precommit-samplenoneIf flag is passed it will create a sample pre commit Dart script. Defaults to false
--hook <hook-name>-kCreates a bash script for the hook passed, supports passing multiple hooks. Defaults to all scripts. Example: -k pre-commit -k commit-msg

Remove

To remove all hooks in your project, run:

$ pub run ghooks remove

Or if you want to remove a specific hook:

$ pub run ghooks remove -k pre-commit -k commit-msg

Git Hooks

Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. ghooks supports all git hooks (https://git-scm.com/docs/githooks)

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Rework Hanzo to use sh inside pubspec.yaml

Use this package as a library

1. Depend on it

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


dependencies:
  ghooks: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:ghooks/ghooks.dart';
  
Version Uploaded Documentation Archive
0.0.1 Jun 13, 2018 Go to the documentation of ghooks 0.0.1 Download ghooks 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0