{"id":19441685,"url":"https://github.com/rhyskeepence/trigger","last_synced_at":"2025-04-25T00:31:07.453Z","repository":{"id":56880995,"uuid":"113328721","full_name":"rhyskeepence/trigger","owner":"rhyskeepence","description":"Cross platform file system watcher for build-and-restart workflows","archived":false,"fork":false,"pushed_at":"2017-12-29T16:14:39.000Z","size":49,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-28T14:21:52.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhyskeepence.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-06T14:48:56.000Z","updated_at":"2022-08-20T02:35:22.000Z","dependencies_parsed_at":"2022-08-20T22:31:16.282Z","dependency_job_id":null,"html_url":"https://github.com/rhyskeepence/trigger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhyskeepence%2Ftrigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhyskeepence%2Ftrigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhyskeepence%2Ftrigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhyskeepence%2Ftrigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhyskeepence","download_url":"https://codeload.github.com/rhyskeepence/trigger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223973775,"owners_count":17234523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T15:36:37.845Z","updated_at":"2024-11-10T15:36:38.304Z","avatar_url":"https://github.com/rhyskeepence.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trigger\n\n`Trigger` is a cross platform file system watcher for super fast build-and-restart workflows. When files change, it can be configured to:\n - run build tasks\n - restart your app in the background\n\n`fswatch` and others are good general purpose tools for triggering tasks on filesystem changes. \nHowever, they don't support stopping and starting background processes.\n\n# How does it work?\n\n```\n         -------------------------------\n        | start processes in background |\n         -------------------------------\n                       |\n                 wait for change \u003c-----------\n                       |                     |\n         -------------------------------     |\n        |   stop background processes   |    |\n         -------------------------------     |\n                       |                     |\n         -------------------------------     |\n        | run build tasks sequentially  |    |\n         -------------------------------     |\n                       |                     |\n         -------------------------------     |\n        | start processes in background |    |\n         -------------------------------     |\n                       |                     |\n                        ---------------------  \n\n```\n\n# Installation\n\nIt's Haskell, so download Stack.\n\nClone and run `stack build --install`\n\nThis should install `trigger` on your PATH.\n\nIf you get linking issues on Windows, see [this issue](https://github.com/commercialhaskell/stack/issues/425)\n\n# Configuration\n\nCreate a file named `trigger.yaml`\n\nHere is an example:\n```yaml\n- dirs:\n    - \"src\"\n  files:\n    - \"**/*.hs\"\n  ignore:\n    - \"**/Ignored.hs\"\n  tasks: \n    - \"stack build\"\n  exec:\n    - \"target/executable\"      \n```\n\nWhich consists of:\n\n- `dirs`: one or more directories to watch for changes. To reduce file handles, it is best to keep this as scoped as possible (rather than using `.`).\n- `files`: one or more file globs, relative to the current working directory. Files that don't match will not trigger. \n- `ignore`: (optional) one or more file globs. Overrides the above file globs to exclude particular files. \n- `clearScreen`: (optional boolean) The default is to clear the screen when a file changes. Set this to false to disable this behaviour.\n- `tasks`: (optional) one or more tasks, which are run sequentially in the foreground. Any error will stop subsequent tasks.\n- `exec`: (optional) one or more background processes.\n\nThis configuration can be repeated for other directories and tasks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhyskeepence%2Ftrigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhyskeepence%2Ftrigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhyskeepence%2Ftrigger/lists"}