-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(deps): bump dart sdk * feat: implement colored string extension * chore: reorganize classes * feat(#15): deprecate executables and use arguments * misc(): add magenta color * refactor(#17): part 1 * chore: update gitignore * chore(): bump dart sdk * feat(): add grinder tasks * style(): format code * docs(#16): update documentation and examples * refactor(#17): part 2
- Loading branch information
1 parent
670ef35
commit 068eab5
Showing
32 changed files
with
490 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ updates: | |
interval: monthly | ||
labels: | ||
- autosubmit | ||
- package-ecosystem: pub | ||
directory: / | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# https://dart.dev/guides/libraries/private-files | ||
# Created by `dart pub` | ||
|
||
# Files and directories created by pub | ||
.dart_tool/ | ||
.packages | ||
build/ | ||
pubspec.lock | ||
|
||
# Files generated during tests | ||
.test_coverage.dart | ||
coverage/ | ||
.test_runner.dart | ||
|
||
# Android studio and IntelliJ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:args/command_runner.dart'; | ||
import 'package:dart_hooks/commands/exports.dart'; | ||
|
||
void main(List<String> args) async { | ||
CommandRunner<String>('dart_hooks', | ||
'DartHooks - Automating the integration and management of Git Hooks in Dart projects') | ||
..addCommand(InitCommand()) | ||
..addCommand(ApplyCommand()) | ||
..addCommand(DestroyCommand()) | ||
..run(args); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,66 @@ | ||
# How to Use | ||
# How to Use 🤷 | ||
|
||
- [How to Use](#how-to-use) | ||
- [Initialize the Config](#initialize-the-config) | ||
- [Applying the Hooks](#applying-the-hooks) | ||
- [Example Config File](#example-config-file) | ||
- [How to Uninstall](#how-to-uninstall) | ||
- [How to Use 🤷](#how-to-use-) | ||
- [How to install 📦](#how-to-install-) | ||
- [Install the package via pub.dev:](#install-the-package-via-pubdev) | ||
- [Development Installation 🛠️](#development-installation-️) | ||
- [Initialize the Config ⚙️](#initialize-the-config-️) | ||
- [Applying the Hooks 🪝](#applying-the-hooks-) | ||
- [Example Config File 📁](#example-config-file-) | ||
- [How to Uninstall 🗑️](#how-to-uninstall-️) | ||
|
||
## How to install 📦 | ||
|
||
## Initialize the Config | ||
### Install the package via [pub.dev](https://pub.dev/packages/dart_hooks): | ||
|
||
```sh | ||
dart pub add dart_hooks --dev | ||
``` | ||
|
||
### Development Installation 🛠️ | ||
|
||
For development purposes, you can install the package from the local directory. | ||
|
||
Clone the repository and checkout the desired branch: | ||
|
||
```sh | ||
git clone [email protected]:errorempire/DartHooks.git | ||
``` | ||
|
||
Add the following to your `pubspec.yaml` file: | ||
|
||
```yaml | ||
--- | ||
dev_dependencies: | ||
dart_hooks: | ||
path: <some_path>/DartHooks | ||
``` | ||
Run the following command to install the package: | ||
```sh | ||
dart pub get | ||
``` | ||
|
||
## Initialize the Config ⚙️ | ||
|
||
Execute the following command to create the `dart_hooks.yaml` file: | ||
|
||
```sh | ||
dart run dart_hooks:init | ||
dart run dart_hooks init | ||
``` | ||
|
||
## Applying the Hooks | ||
## Applying the Hooks 🪝 | ||
|
||
You should modify the list of hooks in the `dart_hooks.yaml` file (i.e., by adding or deleting a hook), you will need to apply the updated hook. | ||
|
||
Note that if you are only changing the commands list, executing the following command is not necessary. | ||
Note that if you are only changing the commands list, executing the following command is necessary. | ||
|
||
```sh | ||
dart run dart_hooks:apply | ||
dart run dart_hooks apply | ||
``` | ||
|
||
# Example Config File | ||
## Example Config File 📁 | ||
|
||
```yaml | ||
--- | ||
|
@@ -35,20 +70,24 @@ pre-commit: | |
pre-push: | ||
commands: | ||
- dart analyze | ||
``` | ||
OR: | ||
```yaml | ||
--- | ||
pre-commit: | ||
commands: dart analyze | ||
commands: [dart analyze] | ||
pre-push: | ||
commands: dart analyze | ||
commands: [dart analyze] | ||
``` | ||
# How to Uninstall | ||
## How to Uninstall 🗑️ | ||
To remove the hooks and configuration file, execute the command below: | ||
```sh | ||
dart run dart_hooks:destroy | ||
dart run dart_hooks destroy | ||
``` | ||
|
||
Subsequently, you can remove the dependency by running: | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.