{"id":25020899,"url":"https://github.com/frontainer/sync-dir","last_synced_at":"2025-03-30T10:26:25.956Z","repository":{"id":65374293,"uuid":"65779269","full_name":"frontainer/sync-dir","owner":"frontainer","description":"sync directory in package.json","archived":false,"fork":false,"pushed_at":"2016-10-08T01:22:47.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T00:41:23.911Z","etag":null,"topics":["npm-scripts"],"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/frontainer.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":"2016-08-16T02:04:35.000Z","updated_at":"2017-02-19T10:16:05.000Z","dependencies_parsed_at":"2023-01-20T01:15:38.046Z","dependency_job_id":null,"html_url":"https://github.com/frontainer/sync-dir","commit_stats":null,"previous_names":["frontainer/sync-dir"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frontainer%2Fsync-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frontainer%2Fsync-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frontainer%2Fsync-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frontainer%2Fsync-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frontainer","download_url":"https://codeload.github.com/frontainer/sync-dir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246304466,"owners_count":20755907,"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":["npm-scripts"],"created_at":"2025-02-05T12:18:06.725Z","updated_at":"2025-03-30T10:26:25.933Z","avatar_url":"https://github.com/frontainer.png","language":"JavaScript","readme":"# sync-dir\n\nsync directory in package.json\n\n## Require\n\nNode.js =\u003c 5.0\n\n## Install\n\n```\nnpm i sync-dir --save-dev\n```\n\n## Usage\n\nAdd 'sync' property to package.json.\n\n```\n{\n  \"sync\": {\n    \"/path/to/source/**/*\": \"/path/to/dest\"\n  }\n}\n```\n\nOr create `sync.conf.js`. When, execute `sync-dir` command with `-c ./sync.conf.js` option.\n\n```\nmodule.exports = {\n    \"/path/to/source/**/*\": \"/path/to/dest\"\n};\n```\n\n### CLI\n\n```\n# from package.json's sync property.\n$ sync-dir \n\n# watch files\n$ sync-dir -w\n\n# from `sync.conf.js`\n$ sync-dir -c ./sync.conf.js\n```\n\n### Options\n\n- -w, --watch: watch directories\n- -c, --config: load sync files config\n- -v, --version version: show version number\n- -h, --help help: show help\n\n### Module\n\n```\nconst syncDir = require('sync-dir');\nsyncDir.copy({\n    '/path/to/source/**/*': '/path/to/dest'\n}).then(() =\u003e {\n    // done\n}).catch(() =\u003e {\n    // error\n});\n```\n\n```\nconst syncDir = require('sync-dir');\nconst DATA = {\n    '/path/to/source/**/*': '/path/to/dest'\n};\nlet files = syncDir.getFiles(DATA);\nsyncDir.watch(files,() =\u003e {\n    syncDir.copy(DATA);\n});\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrontainer%2Fsync-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrontainer%2Fsync-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrontainer%2Fsync-dir/lists"}