ignore-sync is a command-line interface (CLI) tool designed to streamline the management and synchronization of various ignore files, such as `.gitignore`, `.npmignore`, and `.eslintignore`, across projects and repositories. Currently at version 8.0.0, this tool automates the tedious process of composing and maintaining multiple ignore files, which often involves combining patterns from different sources like GitHub's official gitignore templates (e.g., Node.gitignore + macOS.gitignore). Its key differentiator lies in its ability to consolidate ignore patterns from diverse sources—including specific files from GitHub repositories, local files (with optional relative path prefixing), and inline patterns—all configured within a single `*.ignore-sync` file. This approach significantly reduces manual updates, minimizes human error, and ensures consistent ignore rules throughout a development ecosystem. The package is actively maintained, though a specific release cadence isn't published. It targets Node.js environments (`^18.12.0 || >=20.9.0`) and is primarily used via `npm scripts` or `npx`.
npm install ignore-syncVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates installing ignore-sync, configuring an npm script, creating a sample `.gitignore-sync` file with various source types, and running the tool to generate the `.gitignore` file.
Consult the official GitHub repository's release notes for version-specific breaking changes and migration guides.
Ensure local paths are correct relative to the `ignore-sync` configuration file and test glob patterns thoroughly. Use absolute paths if necessary or for clarity.
Consider caching generated ignore files in CI/CD, or configure a GitHub token (if supported by `ignore-sync` or future versions) to increase rate limits. Run `ignore-sync` less frequently during development cycles.
Manually extract any unique patterns from the target ignore file and integrate them into an `[inline]` section of your `*.ignore-sync` file before running the tool.
Ensure `ignore-sync` is installed (`npm install --save-dev ignore-sync`) and run it via `npx ignore-sync` or `npm run <your-script-name>` if defined in `package.json`.
Double-check the file path specified in your `*.ignore-sync` file to ensure it's correct and the file exists. Paths are relative to the `ignore-sync` config file by default.
Verify that the GitHub repository path is correctly formatted, including the username/organization and repository name. The optional `#$ref` (branch/commit) should also be valid.
No dependency data recorded yet.