Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Use axios #23

Merged
merged 1 commit into from
Aug 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
Local Installation
==================

To install the command line tool, run:
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/asciidoc-link-check)

```bash
sudo snap install asciidoc-link-check
```

Or install with NodeJS, run:

``` bash
npm install -g asciidoc-link-check
Expand Down
4 changes: 2 additions & 2 deletions asciidoc-link-check
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var chalk = require('chalk');
var fs = require('fs');
var asciidocLinkCheck = require('./');
var program = require('commander');
var request = require('request');
const axios = require('axios');
var url = require('url');
var path = require('path');

Expand All @@ -28,7 +28,7 @@ program
.action(function (filenameOrUrl) {
filenameOutput = filenameOrUrl;
if (/https?:/.test(filenameOrUrl)) {
stream = request.get(filenameOrUrl);
stream = axios.get(filenameOrUrl);
try { // extract baseUrl from supplied URL
var parsed = url.parse(filenameOrUrl);
delete parsed.search;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"link-check": ">=4.4.4",
"lodash": ">=4.17.11",
"progress": "^2.0.3",
"request": "^2.88.0"
"axios": "^0.19.2"
},
"devDependencies": {
"jshint": "^2.9.7"
Expand Down
2 changes: 2 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ description: |
$ find . -name \*.adoc -exec asciidoc-link-check -p {} \;
Ignore specific links:
$ asciidoc-link-check README.adoc -c <configfile.json>
version: 1.0.13
grade: stable

base: core18
confinement: strict
Expand Down