{"id":16489996,"url":"https://github.com/hayes/relocate","last_synced_at":"2026-06-06T22:31:00.763Z","repository":{"id":21174987,"uuid":"24479297","full_name":"hayes/relocate","owner":"hayes","description":null,"archived":false,"fork":false,"pushed_at":"2014-10-06T17:40:40.000Z","size":392,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T23:19:50.740Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hayes.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":"2014-09-25T23:50:46.000Z","updated_at":"2014-09-25T23:51:35.000Z","dependencies_parsed_at":"2022-08-22T18:50:29.900Z","dependency_job_id":null,"html_url":"https://github.com/hayes/relocate","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayes%2Frelocate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayes%2Frelocate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayes%2Frelocate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayes%2Frelocate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hayes","download_url":"https://codeload.github.com/hayes/relocate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241316556,"owners_count":19943101,"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-11T13:46:10.347Z","updated_at":"2026-06-06T22:31:00.726Z","avatar_url":"https://github.com/hayes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# relocate\n\n## Usage\n`relocate test test/unit --remove`\nor\n`relocate test.js test/unit.js --remove`\n\n### flags\n* `--remove` or `-r` remove original files after moving\n* `--ignore` or `-i` ignore file/dir defaults to ignoring `.git` and `node_modules`\n* `--transform` or `-t` path to transform module.\n* `--force` or `-f` overwrite existing files\n\n`transform` and `ignore` can be added multiple times\n`relocate foo foo/bar -i test -i .git`\n\n### transforms\n\ntransform paths should point to a module that exports a single function.\nthis function is called with 4 arguments.\n* content: the file content\n* src: the original file location\n* dest: the new file location\n* done: callback that must be called with 2 arguments\n  * error: an error object or null\n  * content: the transformed content\n\n## API\n\n###`relocate(src, dest, options, done)`\n* src: the original file location\n* dest: the new file location\n* options: object\n  * force: boolean\n  * ignores: array of file or directory names\n  * transforms: array of functions\n  * remove: boolean\n* done: callback\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayes%2Frelocate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhayes%2Frelocate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayes%2Frelocate/lists"}