Skip to content

Commit 8d8472a

Browse files
authoredDec 6, 2020
feat: distribute bundled binaries (#204)
1 parent c7fa9ad commit 8d8472a

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed
 

‎.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
node-version: 12
6161
- run: npm install
6262
- run: npm run compile
63+
- run: npm run build-binaries
6364
- run: npx semantic-release
6465
env:
6566
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.releaserc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"assets": "build/binaries/*"
3+
}

‎README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@
1010

1111

1212
Behold my latest inator! The `linkinator` provides an API and CLI for crawling websites and validating links. It's got a ton of sweet features:
13-
- 🔥Easily perform scans on remote sites or local files
14-
- 🔥Scan any element that includes links, not just `<a href>`
15-
- 🔥Supports redirects, absolute links, relative links, all the things
16-
- 🔥Configure specific regex patterns to skip
17-
- 🔥Scan markdown files without transpilation
13+
- 🔥 Easily perform scans on remote sites or local files
14+
- 🔥 Scan any element that includes links, not just `<a href>`
15+
- 🔥 Supports redirects, absolute links, relative links, all the things
16+
- 🔥 Configure specific regex patterns to skip
17+
- 🔥 Scan markdown files without transpilation
1818

1919
## Installation
2020

2121
```sh
2222
$ npm install linkinator
2323
```
2424

25+
Not into the whole node.js or npm thing? You can also download a standalone binary that bundles node, linkinator, and anything else you need. See [releases](https://github.com/JustinBeckwith/linkinator/releases).
26+
2527
## Command Usage
2628

2729
You can use this as a library, or as a CLI. Let's see the CLI!
@@ -42,10 +44,10 @@ $ linkinator LOCATIONS [ --arguments ]
4244
4345
--config
4446
Path to the config file to use. Looks for `linkinator.config.json` by default.
45-
47+
4648
--format, -f
4749
Return the data in CSV or JSON format.
48-
50+
4951
--help
5052
Show this command.
5153
@@ -57,9 +59,9 @@ $ linkinator LOCATIONS [ --arguments ]
5759
5860
--recurse, -r
5961
Recursively follow links on the same root domain.
60-
62+
6163
--server-root
62-
When scanning a locally directory, customize the location on disk
64+
When scanning a locally directory, customize the location on disk
6365
where the server is started. Defaults to the path passed in [LOCATION].
6466
6567
--silent
@@ -153,7 +155,7 @@ Asynchronous method that runs a site wide scan. Options come in the form of an o
153155
- `concurrency` (number) - The number of connections to make simultaneously. Defaults to 100.
154156
- `port` (number) - When the `path` is provided as a local path on disk, the `port` on which to start the temporary web server. Defaults to a random high range order port.
155157
- `recurse` (boolean) - By default, all scans are shallow. Only the top level links on the requested page will be scanned. By setting `recurse` to `true`, the crawler will follow all links on the page, and continue scanning links **on the same domain** for as long as it can go. Results are cached, so no worries about loops.
156-
- `serverRoot` (string) - When scanning a locally directory, customize the location on disk
158+
- `serverRoot` (string) - When scanning a locally directory, customize the location on disk
157159
where the server is started. Defaults to the path passed in `path`.
158160
- `timeout` (number) - By default, requests made by linkinator do not time out (or follow the settings of the OS). This option (in milliseconds) will fail requests after the configured amount of time.
159161
- `markdown` (boolean) - Automatically parse and scan markdown if scanning from a location on disk.
@@ -263,15 +265,15 @@ complex();
263265
## Notes
264266

265267
### Using a proxy
266-
This library supports proxies via the `HTTP_PROXY` and `HTTPS_PROXY` environment variables. This [guide](https://www.golinuxcloud.com/set-up-proxy-http-proxy-environment-variable/) provides a nice overview of how to format and set these variables.
268+
This library supports proxies via the `HTTP_PROXY` and `HTTPS_PROXY` environment variables. This [guide](https://www.golinuxcloud.com/set-up-proxy-http-proxy-environment-variable/) provides a nice overview of how to format and set these variables.
267269

268270
### Globbing
269271
You may have noticed in the example, when using a glob the pattern is encapsulated in quotes:
270272
```sh
271273
$ linkinator "**/*.md" --markdown
272274
```
273275

274-
Without the quotes, some shells will attempt to expand the glob paths on their own. Various shells (bash, zsh) have different, somewhat unpredictable behaviors when left to their own devices. Using the quotes ensures consistent, predictable behavior by letting the library expand the pattern.
276+
Without the quotes, some shells will attempt to expand the glob paths on their own. Various shells (bash, zsh) have different, somewhat unpredictable behaviors when left to their own devices. Using the quotes ensures consistent, predictable behavior by letting the library expand the pattern.
275277

276278
## License
277279

‎package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"test": "c8 mocha build/test",
1717
"fix": "gts fix",
1818
"codecov": "c8 report --reporter=json && codecov -f coverage/*.json",
19-
"lint": "gts check"
19+
"lint": "gts lint",
20+
"build-binaries": "pkg . --out-path build/binaries"
2021
},
2122
"dependencies": {
2223
"chalk": "^4.0.0",
@@ -52,6 +53,7 @@
5253
"gts": "^3.0.0",
5354
"mocha": "^8.0.0",
5455
"nock": "^13.0.0",
56+
"pkg": "^4.4.9",
5557
"semantic-release": "^17.0.0",
5658
"sinon": "^9.0.0",
5759
"typescript": "^4.0.0"

0 commit comments

Comments
 (0)
Please sign in to comment.