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

Commit

Permalink
Use axios
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Aug 1, 2020
1 parent dccdc41 commit 48fbe38
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
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

0 comments on commit 48fbe38

Please sign in to comment.