From 3145aa047c2a91d334bbe98b1699638cf282718e Mon Sep 17 00:00:00 2001 From: Gaurav Nelson Date: Fri, 9 Feb 2018 12:17:37 +1000 Subject: [PATCH] added ga --- asciidoc-link-check | 9 +++++++++ package-lock.json | 20 ++++++++++---------- package.json | 3 ++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/asciidoc-link-check b/asciidoc-link-check index d6ff8f5..3e0a8ce 100755 --- a/asciidoc-link-check +++ b/asciidoc-link-check @@ -9,6 +9,14 @@ var program = require('commander'); var request = require('request'); var url = require('url'); var path = require('path'); +const uuidv4 = require('uuid/v4'); +var thisuuid = uuidv4(); + +request({ + uri: "https://www.google-analytics.com/collect", + method: "POST", + form: {"v": "1", "t": "event", "tid": "UA-106891751-2", "cid": thisuuid, "ec":"linkcheck", "ea":"main" } +}); var statusLabels = { alive: chalk.green('✓'), @@ -47,6 +55,7 @@ stream.on('data', function (chunk) { }).on('end', function () { console.log(chalk.cyan('\nFILE: ' + filenameOutput)) asciidocLinkCheck(asciidoc, opts, function (err, results) { + if (results.length === 0) { console.log(chalk.yellow('No hyperlinks found!\n')) } diff --git a/package-lock.json b/package-lock.json index 9aa417e..6f1b14f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,9 +24,9 @@ } }, "asciidoc-link-extractor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asciidoc-link-extractor/-/asciidoc-link-extractor-1.0.0.tgz", - "integrity": "sha1-Kq3gWdauhF1xX5PiwlUMrdMqfbg=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/asciidoc-link-extractor/-/asciidoc-link-extractor-1.0.1.tgz", + "integrity": "sha512-V3zmdc+cd4Y4J9HRxa5SgKHUiDs2fygp5JqgTf7YEw33hGKI7JhRDP8jjgVvBqnm/NOkDN3gMxtUeG/QsVFmnQ==" }, "asn1": { "version": "0.2.3", @@ -43,7 +43,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "lodash": "4.17.4" + "lodash": "4.17.5" } }, "asynckit": { @@ -120,9 +120,9 @@ } }, "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" }, "core-util-is": { "version": "1.0.2", @@ -337,9 +337,9 @@ } }, "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" }, "mime-db": { "version": "1.30.0", diff --git a/package.json b/package.json index bea9b54..f592bb0 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "link-check": "^4.3.3", "lodash": "^4.17.5", "progress": "^2.0.0", - "request": "^2.83.0" + "request": "^2.83.0", + "uuid": "^3.2.1" } }