{"id":13483131,"url":"https://github.com/faustinoaq/kemal-watcher","last_synced_at":"2025-05-12T22:03:32.166Z","repository":{"id":76219147,"uuid":"86625313","full_name":"faustinoaq/kemal-watcher","owner":"faustinoaq","description":"Kemal plugin to watch files and live-reload the browser","archived":false,"fork":false,"pushed_at":"2018-06-17T21:14:51.000Z","size":28,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T22:03:21.955Z","etag":null,"topics":["crystal","kemal"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faustinoaq.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-03-29T20:14:49.000Z","updated_at":"2024-04-19T08:23:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bb3771f-1520-4701-b467-766dec37790e","html_url":"https://github.com/faustinoaq/kemal-watcher","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustinoaq%2Fkemal-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustinoaq%2Fkemal-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustinoaq%2Fkemal-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustinoaq%2Fkemal-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faustinoaq","download_url":"https://codeload.github.com/faustinoaq/kemal-watcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253830956,"owners_count":21971004,"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":["crystal","kemal"],"created_at":"2024-07-31T17:01:08.497Z","updated_at":"2025-05-12T22:03:32.112Z","avatar_url":"https://github.com/faustinoaq.png","language":"Crystal","funding_links":[],"categories":["Development Tools"],"sub_categories":[],"readme":"# kemal-watcher\n\n[![Build Status](https://travis-ci.org/faustinoaq/kemal-watcher.svg?branch=master)](https://travis-ci.org/faustinoaq/kemal-watcher)\n\n[Kemal](https://github.com/kemalcr/kemal) plugin to watch files like client stuff.\n\n## Installation\n\nAdd this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  kemal-watcher:\n    github: faustinoaq/kemal-watcher\n```\n\n## Usage\n\nAdd `Kemal.watch` to your Kemal app to watch files.\n\n```crystal\nrequire \"kemal\"\nrequire \"kemal-watcher\"\n\nget \"/\" do\n  File.read \"src/views/index.html\"\nend\n\nfiles = [\n  \"public/*.js\",\n  \"public/*.html\"\n]\n\nKemal.watch(files)\nKemal.run\n```\n\n# How does it works?\n\n`Kemal.watch` uses [watcher](https://github.com/faustinoaq/watcher) to watch files and add a new handler to Kemal that inject a script in the response. When a change is detected an event handler is executed and then send a reload signal to the clients.\n\n## Contributing\n\n1. Fork it ( https://github.com/faustinoaq/kemal-watcher/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Disclaimer\n\n`Kemal.watch` is intended for use in a development environment.\n\n## Contributors\n\n- [faustinoaq](https://github.com/faustinoaq) Faustino Aguilar - creator, maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaustinoaq%2Fkemal-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaustinoaq%2Fkemal-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaustinoaq%2Fkemal-watcher/lists"}