{"id":18063053,"url":"https://github.com/stagas/watch-js","last_synced_at":"2025-07-21T15:08:21.616Z","repository":{"id":7216080,"uuid":"8522726","full_name":"stagas/watch-js","owner":"stagas","description":"watch clone in node.js","archived":false,"fork":false,"pushed_at":"2015-10-08T13:25:05.000Z","size":187,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T11:21:53.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stagas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-02T15:45:24.000Z","updated_at":"2019-07-15T17:46:18.000Z","dependencies_parsed_at":"2022-08-29T08:31:03.234Z","dependency_job_id":null,"html_url":"https://github.com/stagas/watch-js","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/stagas%2Fwatch-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwatch-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwatch-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwatch-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stagas","download_url":"https://codeload.github.com/stagas/watch-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429117,"owners_count":21101785,"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-10-31T05:09:15.391Z","updated_at":"2025-04-11T15:13:50.026Z","avatar_url":"https://github.com/stagas.png","language":"JavaScript","readme":"\n# watch-js\n\n```\n  Usage: watch [options] \u003cfile\u003e\n\n  Options:\n\n    -h, --help          output usage information\n    -V, --version       output the version number\n    -m, --match \u003cglob\u003e  Only report changes when filename matches glob.\n    -i, --interval \u003cs\u003e  Run on an interval of seconds.\n    -b, --before \u003ccmd\u003e  Command to run before monitoring starts.\n    -r, --running       Monitor long-running process.\n    -v, --verbose       Be verbose.\n    -l, --live          Live reload.\n    -d, --delay \u003cms\u003e    Time in ms to delay updates.\n    -w, --watch \u003cdir\u003e   Watch for changes on dir.\n```\n\n## Examples\n\nRuns `make` when a file changes:\n\n```sh\n$ watch make\n```\n\nRuns `make` before monitoring __(-b)__, then runs `node server`, a long-running process __(-r)__:\n\n```sh\n$ watch -rb make node server\n```\n\nRuns `make` then reloads __(-l)__ browser when files of type `.js` or `.css` change __(-m)__:\n\n```sh\n$ watch -lm *.{js,css} make\n```\n\nThe above method requires this script tag:\n\n```html\n\u003cscript src=\"http://localhost:3003/reload.js\"\u003e\u003c/script\u003e\n```\n\nIf you use [Components](https://github.com/component/component/wiki/Components)\nyou can add it in like this:\n\n```js\n\"development\": {\n  \"stagas/watch-js\": \"*\"\n}\n```\n\nThen you can do `require('stagas-watch-js')` in your development files.\n\nNow, in conjunction with `watch -l make`, when you save a file in your editor it will run `make` and reload your browser automatically.\n\nCombinations possible:\n\n```sh\n$ watch -lrb \"make clean build\" node server\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fwatch-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstagas%2Fwatch-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fwatch-js/lists"}