{"id":26119128,"url":"https://github.com/weavejester/ns-tracker","last_synced_at":"2025-04-07T16:17:38.945Z","repository":{"id":47060286,"uuid":"2496433","full_name":"weavejester/ns-tracker","owner":"weavejester","description":"Library to keep track of changes to Clojure source files","archived":false,"fork":false,"pushed_at":"2024-06-19T16:34:54.000Z","size":59,"stargazers_count":116,"open_issues_count":1,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-31T14:59:45.417Z","etag":null,"topics":["clojure","dependency-tracker","repl","ring"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weavejester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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,"publiccode":null,"codemeta":null}},"created_at":"2011-10-01T20:14:22.000Z","updated_at":"2025-03-20T22:07:23.000Z","dependencies_parsed_at":"2024-12-24T11:41:15.549Z","dependency_job_id":"86c92161-42be-4e13-aa31-b27a7ab25451","html_url":"https://github.com/weavejester/ns-tracker","commit_stats":{"total_commits":64,"total_committers":12,"mean_commits":5.333333333333333,"dds":0.21875,"last_synced_commit":"e693225c6f920f633aa383c11bc80171e1aa53aa"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fns-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fns-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fns-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fns-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weavejester","download_url":"https://codeload.github.com/weavejester/ns-tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685628,"owners_count":20979085,"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":["clojure","dependency-tracker","repl","ring"],"created_at":"2025-03-10T12:15:36.606Z","updated_at":"2025-04-07T16:17:38.920Z","avatar_url":"https://github.com/weavejester.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ns-tracker\n\n[![Build Status](https://github.com/weavejester/ns-tracker/actions/workflows/test.yml/badge.svg)](https://github.com/weavejester/ns-tracker/actions/workflows/test.yml)\n\nns-tracker is a Clojure library for keeping track of changes to source\nfiles and their associated namespaces. This is usually used to\nautomatically reload modified namespaces in a running Clojure\napplication.\n\nIt is derived from code in Stuart Sierra's [Lazytest][] tool, and the\ncredit for writing the vast majority of the code used in this library\nshould therefore go to him.\n\n[lazytest]: https://github.com/stuartsierra/lazytest\n\n## Installation\n\nAdd the following dependency to your deps.edn file:\n\n    ns-tracker/ns-tracker {:mvn/version \"1.0.0\"}\n\nOr this to your Leiningen dependencies:\n\n    [ns-tracker \"1.0.0\"]\n\n## Usage\n\nUse the `ns-tracker.core/ns-tracker` function to create a new tracker\nfunction for one or more source directories:\n\n    (require '[ns-tracker.core :as nt])\n\n    (def modified-namespaces\n      (nt/ns-tracker [\"src\" \"test\"]))\n\nWhen you call the `modified-namespaces` function, it will return a list\nof Clojure namespaces that have changed. You can then reload them on\nthe fly:\n\n    (doseq [ns-sym (modified-namespaces)]\n      (require ns-sym :reload))\n\nThis can be placed in a background thread, or triggered by some user\nrequest.\n\n### Declaring Dependencies to Static Resources\n\nSome Clojure libraries, such as\n[HugSQL](https://www.hugsql.org/#using-def-db-fns), define functions in\na namespace based on the content of a static resource file. ns-tracker\nis able to reload such a namespace when the resource file is modified\nwith the help of a bit metadata.\n\nYou will need to declare the resources under the\n`:ns-tracker/resource-deps` key in the namespace's metadata:\n\n    (ns example.db\n      {:ns-tracker/resource-deps [\"sql/queries.sql\"]}\n      (:require example.utils))\n\nThe resource path needs to be relative to one of the source directories\nwhich you gave as a parameter to the `ns-tracker.core/ns-tracker`\nfunction.\n\n## License\n\nCopyright © 2024 James Reeves, Stuart Sierra\n\nDistributed under the Eclipse Public License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fns-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweavejester%2Fns-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fns-tracker/lists"}