grunt-link-checker
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "grunt-link-checker", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Finds broken links and resources on websites", | ||
@@ -5,0 +5,0 @@ "main": "tasks/link-checker.js", |
@@ -24,3 +24,3 @@ # grunt-link-checker | ||
### Minimal Usage | ||
The minimal usage of grunt-link-checker runs with a `site` specified: | ||
The minimal usage of grunt-link-checker runs with a `site` specified and an optional `options.initialPort`: | ||
@@ -30,3 +30,6 @@ ```js | ||
dev: { | ||
site: 'example.com' | ||
site: 'localhost', | ||
options: { | ||
initialPort: 9001 | ||
} | ||
} | ||
@@ -43,2 +46,7 @@ } | ||
#### callback | ||
Type: `Function` | ||
Function that receives the instantiated `crawler` object so that you can add [events](https://github.com/cgiffard/node-simplecrawler#events) or other listeners/config to the crawler. | ||
### simple-crawler options | ||
@@ -51,2 +59,6 @@ Every option specified in the node-simplecrawler is available: | ||
**0.0.5** - Added error reporting if initial `site` URL fails. | ||
**0.0.4** - Added `callback` option. | ||
**0.0.3** - Fixed repo link in package.json and fixed error reporting for a failed initial URL. | ||
@@ -53,0 +65,0 @@ |
@@ -41,4 +41,7 @@ /* | ||
.on('fetchclienterror', function(queueItem) { | ||
errors = true; | ||
if (!queueItem.referrer) { | ||
return grunt.log.error('Error fetching `site` URL: ' + queueItem.url.magenta); | ||
} | ||
grunt.log.error('Client error fetching the following resource linked from ' + queueItem.referrer ? queueItem.referrer.cyan : site + ' to', queueItem.url.magenta); | ||
errors = true; | ||
}) | ||
@@ -45,0 +48,0 @@ .on('complete', function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7863
73
67