link-sweeper
v1.4.0
Published
Link Sweeper is a simple command-line tool designed to keep your web application's links fresh and functional. Tailored for modern web projects, it supports a variety of frameworks such as React, Vue, Svelte, and more, ensuring your project stays link-err
Maintainers
Readme
Link Sweeper 🧹
Link Sweeper is a simple command-line tool designed to keep your web application's links fresh and functional. Tailored for modern web projects, it supports a variety of frameworks such as React, Vue, Svelte, and more, ensuring your project stays link-error-free.
Features
- Comprehensive Scanning: Traverses your project files (HTML, JSX, TSX, Vue, Svelte, Astro) to detect links.
- Robust Link Verification: Validates each discovered link for accessibility, flagging any issues with unreachable URLs.
- Customizable Exclusions: Allows specification of directories to ignore (e.g.,
node_modules,.git) during the scan. - Detailed Reporting: Offers verbose logging for insights into the scanning process and link verification results.
Installation
Install Link Sweeper globally for system-wide access:
npm install -g link-sweeperOr, add it to your project as a development dependency:
npm install link-sweeper --save-devUsage
Scan
Run Link Sweeper in your project directory to scan for links: Be sure to use npx/pnpm/...etc when running globally.
link-sweeper scan ./srcExclude specific directories from the scan:
link-sweeper scan ./src --i node_modules,.gitTo check relative links against a development server:
link-sweeper scan ./src --s http://localhost:3000 --rEnsure your development server is running when using the --s flag. If a server URL is not provided, Link Sweeper attempts to infer the default development server from your project's package.json.
Watch
Run Link Sweeper in watch mode to continuously monitor your project for link changes:
link-sweeper watch ./srcExclude specific directories from the watch:
link-sweeper watch ./src --i node_modules,.gitTo check relative links against a development server:
link-sweeper watch ./src --s http://localhost:3000 --rEnsure your development server is running when using the --s flag. If a server URL is not provided, Link Sweeper attempts to infer the default development server from your project's package.json.
For integration into your project or to utilize Link Sweeper's utilities directly:
npm install link-sweeper --saveHappy Sweeping! 🚀
Contributing
Contributions are welcome! Please refer to the Contributing Guidelines for more information.
