linkcheck-bin
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-1 • Public • Published

npm-installable wrapper for @filiph's linkcheck.

A lot of inspiration (and some code) came from @jakejarvis' hugo-extended.

Installation

npm install linkcheck-bin --save-dev
# or...
yarn add linkcheck-bin --dev

This package's version numbers align with linkcheck's — linkcheck-bin@2.0.20 installs linkcheck 2.0.20, for example.

Usage

CLI / package.json script

// package.json:

{
  // ...
  "scripts": {
    "linkcheck": "linkcheck --external --check-anchors https://tylerbutler.com"
  },
  "devDependencies": {
    "linkcheck-bin": "^2.0.20"
  }
  // ...
}
$ npm run linkcheck

Done crawling.

https://tylerbutler.com
- (233:225) '1' => https://tylerbutler.com#fn:1 (HTTP 200 but missing anchor)

https://tylerbutler.com/
- (233:225) '1' => https://tylerbutler.com/#fn:1 (HTTP 200 but missing anchor)

https://tylerbutler.com/2004/11/tyler-a-novelist/
- (189:55) 'on this ..' => https://tylerbutler.com/tag/nanowrimo (HTTP 404)

...

Errors. Checked 8309 links, 317 destination URLs (483 ignored), 11 have errors, 20 have warnings.

via JS API:

// version.js:

import linkcheck from "linkcheck-bin";
import { execFile } from "child_process";

execFile(linkcheck, ["--version"], (error, stdout) => {
  console.log(stdout);
});
$ node version.js

linkcheck version 2.0.20

License

This project is distributed under the MIT License. linkcheck is also distributed under the MIT License.

Package Sidebar

Install

npm i linkcheck-bin

Weekly Downloads

13

Version

3.0.0-1

License

MIT

Unpacked Size

9.01 kB

Total Files

8

Last publish

Collaborators

  • tylerbutler