{"id":15504776,"url":"https://github.com/foray1010/ignore-sync","last_synced_at":"2025-04-07T08:18:32.862Z","repository":{"id":37336313,"uuid":"110843501","full_name":"foray1010/ignore-sync","owner":"foray1010","description":"a CLI tool to build and sync .*ignore files across files and repositories","archived":false,"fork":false,"pushed_at":"2025-04-04T06:11:11.000Z","size":4550,"stargazers_count":30,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T15:35:45.712Z","etag":null,"topics":["cli","dockerignore","eslintignore","git","gitignore","gitignore-files","gitignore-generator","gitignore-templates","ignore","ignore-files","npmignore"],"latest_commit_sha":null,"homepage":"","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/foray1010.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2017-11-15T14:25:09.000Z","updated_at":"2025-04-04T06:11:13.000Z","dependencies_parsed_at":"2023-11-15T03:23:08.251Z","dependency_job_id":"b033c7c1-1fb3-409c-8b44-a8630149213b","html_url":"https://github.com/foray1010/ignore-sync","commit_stats":{"total_commits":787,"total_committers":8,"mean_commits":98.375,"dds":"0.38246505717916135","last_synced_commit":"329860f465843f43c965fb20deef3f1c9c348918"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foray1010%2Fignore-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foray1010%2Fignore-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foray1010%2Fignore-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foray1010%2Fignore-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foray1010","download_url":"https://codeload.github.com/foray1010/ignore-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247508409,"owners_count":20950225,"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":["cli","dockerignore","eslintignore","git","gitignore","gitignore-files","gitignore-generator","gitignore-templates","ignore","ignore-files","npmignore"],"created_at":"2024-10-02T09:19:56.638Z","updated_at":"2025-04-07T08:18:32.831Z","avatar_url":"https://github.com/foray1010.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ignore-sync\n\na cli tool to build and sync \\*ignore files across files and repositories\n\n## Why\n\n1. Github default `.gitignore` doesn't cover all our needs, we always need to compose and manage multiple `.gitignore` files from github, such as [Node.gitignore](https://github.com/github/gitignore/blob/main/Node.gitignore) + [macOS.gitignore](https://github.com/github/gitignore/blob/main/Global/macOS.gitignore), in order to remove all the noises in our development. It should be automated.\n\n1. For library developer, we often need to compose a `.npmignore` from `.gitignore` and some extra ignore patterns that we do not wish to ignore by `.gitignore`, such as test files and `.*rc` files. If `.gitignore` is updated, you will need to update corresponding part of `.npmignore` manually. We should avoid this repetitive work.\n\na short example on how `ignore-sync` handle ignore files\n\n```ini\n[github/gitignore]\nNode.gitignore\nGlobal/macOS.gitignore\n\n[inline]\n*.test.js\nyarn.lock\n```\n\n## Installation and setup\n\n1. `npm install --save-dev ignore-sync`\n1. update `package.json`\n\n   ```diff json\n   {\n     \"scripts\": {\n   +   \"ignore-sync\": \"ignore-sync .\"\n     }\n   }\n   ```\n\n1. now follow [how to use](#how-to-use) to create `*ignore-sync` files, then `npm run ignore-sync`, all corresponding ignore files will be generated.\n\n## Development Setup\n\nWe are using [corepack](https://nodejs.org/api/corepack.html) to manage the `yarn` version\n\n```bash\ncorepack enable\n```\n\n## How to use\n\n1. `ignore-sync` works on any ignore file that name end with `ignore`, such as `.gitignore`, `.npmignore`, `.eslintignore`, etc. Simply creating a file that end with `ignore-sync`.\n\n   example: `.gitignore-sync` -\u003e `.gitignore`\n\n1. create a source tag in your `*ignore-sync` file to identify the source of ignore patterns\n\n   ```ini\n   [put_source_tag_here]\n   ```\n\n   different source tag identifies different source of ignore patterns\n\n   - `[inline]`\n     - the ignore patterns will be copied directly to generated ignore file\n   - `[local]`\n     - the content of these local files will be copied directly to generated ignore file\n     - support glob pattern, e.g. `packages/**/.gitignore`\n     - support referencing other ignore-sync files, e.g. referencing `.gitignore-sync` in `.npmignore-sync`\n   - `[relative]`\n\n     - the content of these local files will be copied with **relative path prefix** to generated ignore file\n     - support glob pattern, e.g. `packages/**/.gitignore`\n     - support referencing other ignore-sync files, e.g. referencing `.gitignore-sync` in `.npmignore-sync`\n     - example\n\n       ```ini\n       # input: /packages/a/.prettierignore\n       ignored.md\n       ```\n\n       ```ini\n       # input: /.prettierignore-sync\n       [relative]\n       packages/a/.prettierignore\n       ```\n\n       ```ini\n       # output: /.prettierignore\n       packages/a/ignored.md\n       ```\n\n   - `[$username/$repo#$ref]`\n     - the content of these github files will be downloaded and appended to generated ignore file\n     - recommend using ignore patterns from [\\[github/gitignore\\]](https://github.com/github/gitignore)\n     - `$ref` is optional, default to the default branch\n\n1. `npm run ignore-sync`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforay1010%2Fignore-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforay1010%2Fignore-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforay1010%2Fignore-sync/lists"}