Skip to content

Commit e624f86

Browse files
committed
docs: tonic sample
1 parent c970a71 commit e624f86

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ node_js:
55
script:
66
- npm run lint
77
- npm test
8+
- npm link --silent && npm link crawlkit-runner-accessibility-developer-tools --silent
9+
- travis_retry node examples/tonic.js

examples/tonic.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* eslint-disable no-console */
2+
const CrawlKit = require('crawlkit');
3+
const A11yDeveloperToolsRunner = require('crawlkit-runner-accessibility-developer-tools');
4+
5+
const crawler = new CrawlKit('http://www.google.com');
6+
crawler.addRunner('a11y-dev-tools', new A11yDeveloperToolsRunner());
7+
8+
crawler.crawl()
9+
.then((data) => {
10+
console.log(JSON.stringify(data.results, true, 2));
11+
});

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"author": "Joscha Feth <[email protected]>",
2222
"license": "MIT",
2323
"files": [
24-
"src"
24+
"src",
25+
"examples/tonic.js"
2526
],
2627
"bugs": {
2728
"url": "https://github.com/crawlkit/runner-accessibility-developer-tools/issues"
@@ -46,5 +47,6 @@
4647
},
4748
"engines": {
4849
"node": ">=4.2"
49-
}
50+
},
51+
"tonicExampleFilename": "examples/tonic.js"
5052
}

0 commit comments

Comments
 (0)