webcheck-mirror
A mirroring plugin for webcheck
Last updated a year ago by atd .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webcheck-mirror 
SYNC missed versions from official npm registry.

webcheck-mirror

A mirroring plugin for webcheck.

How to install

npm install --save webcheck-mirror

How to use

var Webcheck = require('webcheck');
var MirrorPlugin = require('webcheck-mirror');

var plugin = MirrorPlugin({
    dest: __dirname + '/mirrored'
    ignoreQuery: false,
});

var webcheck = new Webcheck();
webcheck.addPlugin(plugin);

plugin.enable();

// now continue with your code...

Options

  • filterUrl: Filter urls that should only crawled once (default all urls).
  • ignoreQuery: Ignore query in url.

Note for filters

Filters are regular expressions, but the plugin uses only the .test(str) method to proof. You are able to write your own and much complexer functions by writing the logic in the test method of an object like this:

opts = {
   filterSomething: {
       test: function (val) {
           return false || true;
       }
   }
}

Methods

  • reset(undefined | url): Reset a specific url, or the complete ignore list
  • ignore(url): Add a resource to ignore list
  • check(url): Check if a resource is ignored

Current Tags

  • 1.0.0                                ...           latest (a year ago)

3 Versions

  • 1.0.0                                ...           a year ago
  • 0.1.0                                ...           4 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (12)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |