No description
Find a file
dependabot[bot] fc8f2feb24
⬆️ Bump actions/download-artifact in /.github/workflows (#40)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 17:44:50 +09:00
.github ⬆️ Bump actions/download-artifact in /.github/workflows (#40) 2025-01-10 17:44:50 +09:00
doc 📝 Update animation GIF 2019-09-28 10:14:43 +09:00
src feat: Build monit with Nim 2.0.0 (#39) 2023-08-06 23:10:22 +09:00
tests Fix: Build (#37) 2022-02-19 11:52:46 +09:00
.gitignore Fix: Build (#37) 2022-02-19 11:52:46 +09:00
.monit.yml fix: error occured installing with nim 1.4 (#35) 2020-11-07 19:52:45 +09:00
LICENSE 📝 一応使い方 2019-09-01 22:21:21 +09:00
monit.nimble feat: Build monit with Nim 2.0.0 (#39) 2023-08-06 23:10:22 +09:00
README.md chore: nim version 2020-11-07 20:15:02 +09:00

monit

monit is the simple task runner. Run tasks and watch file changes with custom paths.

monit

Usage

monit run commands when files have changed. monit needs a .monit.yml task definition file on current directory. Please you run below at first.

monit init

A template of .monit.yml will be generated. You edit the yaml file and you run below.

monit run

Task definitions

A example of .monit.yml of this repository. See below.

%YAML 1.2
%TAG !n! tag:nimyaml.org,2016:
--- !n!custom:MonitorConfig 
sleep: 1
targets: 
  - 
    name: Task name
    paths: [src, tests]
    commands:
      - nimble build --hints:off
      - nimble test
    extensions: [.nim]
    files: []
    exclude_extensions: []
    exclude_files: []
    once: y

A descriptions of these keys and values.

  • sleep - A interval to monitor files (secconds)

Targets

key value
name Task name ( for human )
paths Target directory to monitor
commands Commands to run when files have changed
extensions Extensions of target files
files File path of target files
exclude_extensions Extensions of exclude files
exclude_files File path of exclude files
once Run command once at first when you executed monit

Installation

nimble install monit

Development

Nim 1.4.0

Help

% monit help
This is a multiple-dispatch command.  Top-level --help/--help-syntax
is also available.  Usage is like:
    monit {SUBCMD} [subcommand-opts & args]
where subcommand syntaxes are as follows:

  init [optional-params] 
    Generate monit config file to current directory. If config file has existed then no generating.
  Options(opt-arg sep :|=|spc):
      -h, --help                  print this cligen-erated help
      --help-syntax               advanced: prepend,plurals,..
      --version      bool  false  print version

  run [optional-params] 
    Run commands on the commands of `file` when file modified.
  Options(opt-arg sep :|=|spc):
      -h, --help                               print this cligen-erated help
      --help-syntax                            advanced: prepend,plurals,..
      --version          bool    false         print version
      -l=, --loopCount=  int     -1            set loopCount
      -f=, --file=       string  ".monit.yml"  A task definition file path
      -v, --verbose      bool    false         Turn ON the debug logging
      -d, --dryRun       bool    false         Not execute commands

LICENSE

MIT