{"_id":"styleguidist-scrapper","_rev":"30-1ccac0d82101a1d448e466ba2779d6a9","name":"styleguidist-scrapper","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"styleguidist-scrapper","version":"1.0.0","keywords":["react","styleguidist","scrapping","visual-testing","components"],"author":{"name":"Mateusz Burzyński","email":"m.burzynski@livechatinc.com"},"license":"MIT","_id":"styleguidist-scrapper@1.0.0","maintainers":[{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"homepage":"https://github.com/livechat/styleguidist-scrapper#readme","bugs":{"url":"https://github.com/livechat/styleguidist-scrapper/issues"},"dist":{"shasum":"69b1b8a1d881931894d56b4793ae2e6a7a2b4a2c","tarball":"https://registry.npmjs.org/styleguidist-scrapper/-/styleguidist-scrapper-1.0.0.tgz","integrity":"sha512-x7euwwD2479bBCLHpftS8e45biSkjVQ69ztSO95qqTgTb27gKzAakt7LUduw4BuHyh7bPBxthS0YivfGS9creA==","signatures":[{"sig":"MEUCIQCndjww92hOuJVrAu1vj1y28UPh0JZoV0liYfYf+9omowIgewH2ieTeaV9oDrg2MCkqQPLwlk2o9ujl/OktmktB2nI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","files":["lib"],"engines":{"node":">=7.6.0"},"gitHead":"04a778e38aafcfcddfd7db0b7feba918dbc9d4f0","scripts":{"test":"echo \"Error: no test specified\" && exit 1","precommit":"lint-staged"},"_npmUser":{"name":"andarist","email":"mateuszburzynski@gmail.com"},"repository":{"url":"git+https://github.com/livechat/styleguidist-scrapper.git","type":"git"},"_npmVersion":"5.5.1","description":"Scrapper script for documentation generated by https://react-styleguidist.js.org/","directories":{},"_nodeVersion":"8.4.0","dependencies":{"lodash":"^4.17.4","puppeteer":"^0.12.0"},"devDependencies":{"husky":"^0.14.3","prettier":"^1.7.4","lint-staged":"^4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/styleguidist-scrapper-1.0.0.tgz_1509464637992_0.8637832158710808","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"styleguidist-scrapper","version":"1.0.1","keywords":["react","styleguidist","scrapping","visual-testing","components"],"author":{"name":"Mateusz Burzyński","email":"m.burzynski@livechatinc.com"},"license":"MIT","_id":"styleguidist-scrapper@1.0.1","maintainers":[{"name":"medi71","email":"ggmedi@o2.pl"},{"name":"konradk","email":"npm@konradk.pl"},{"name":"andarist","email":"mateuszburzynski@gmail.com"},{"name":"bolchowka","email":"b.olchowka@livechatinc.com"}],"homepage":"https://github.com/livechat/styleguidist-scrapper#readme","bugs":{"url":"https://github.com/livechat/styleguidist-scrapper/issues"},"dist":{"shasum":"2576d19621d6c927bf9cc316270832845ba29f29","tarball":"https://registry.npmjs.org/styleguidist-scrapper/-/styleguidist-scrapper-1.0.1.tgz","integrity":"sha512-bQBWZLPKVt1Tj3zvN2JQhBxURr+d3i8MvzcxPxOog659f60yFyayVgbuXSkPMrH3r8NWuOjda6RvWd0/JKnshg==","signatures":[{"sig":"MEUCIFgG0M+1iH0OOAH4ra3A10+epUE7m0g9vhX8R817J78nAiEAm95whpoJpiRiEyLx1Qo+DfWaeqhjavT5mfWt2BGS35Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","files":["lib"],"engines":{"node":">=7.6.0"},"gitHead":"448a27430baa43cb31bd4899f32c372698151ae1","scripts":{"test":"echo \"Error: no test specified\" && exit 1","precommit":"lint-staged"},"_npmUser":{"name":"andarist","email":"mateuszburzynski@gmail.com"},"repository":{"url":"git+https://github.com/livechat/styleguidist-scrapper.git","type":"git"},"_npmVersion":"5.5.1","description":"Scrapper script for documentation generated by https://react-styleguidist.js.org/","directories":{},"_nodeVersion":"8.4.0","dependencies":{"lodash":"^4.17.4","puppeteer":"^0.12.0"},"devDependencies":{"husky":"^0.14.3","prettier":"^1.7.4","lint-staged":"^4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/styleguidist-scrapper-1.0.1.tgz_1509496190956_0.5279380569700152","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-10-31T15:43:58.931Z","modified":"2025-01-02T09:45:38.558Z","1.0.0":"2017-10-31T15:43:58.931Z","1.0.1":"2017-11-01T00:29:51.907Z"},"bugs":{"url":"https://github.com/livechat/styleguidist-scrapper/issues"},"author":{"name":"Mateusz Burzyński","email":"m.burzynski@livechatinc.com"},"license":"MIT","homepage":"https://github.com/livechat/styleguidist-scrapper#readme","keywords":["react","styleguidist","scrapping","visual-testing","components"],"repository":{"url":"git+https://github.com/livechat/styleguidist-scrapper.git","type":"git"},"description":"Scrapper script for documentation generated by https://react-styleguidist.js.org/","maintainers":[{"email":"k.kraus@livechat.com","name":"ziggykraus"},{"email":"mateuszburzynski@gmail.com","name":"andarist"},{"email":"npm@konradk.pl","name":"konradk"},{"email":"walaszczykm@gmail.com","name":"walaszczykm"},{"email":"k.klarzynski@livechatinc.com","name":"klarzynskik"},{"email":"jawinskidsgn@gmail.com","name":"jawinski"},{"email":"s.rakowski@livechat.com","name":"stanislaw-rakowski"},{"email":"j.gabory@text.com","name":"yrobag"},{"email":"b.stiskun@text.com","name":"b.stiskun-text"}],"readme":"# styleguidist-scrapper\n\nThis is a scrapper script targeting documentation generated by [react-styleguidist](https://react-styleguidist.js.org/).\n\nIt's main purpose is to generate metadata of documented examples which can be used to generate visual snapshot tests using [jest](https://facebook.github.io/jest/), [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot) and [puppeteer](https://github.com/GoogleChrome/puppeteer).\n\n## API\n\n```js\nscrape(styleguideUrl: string): Promise<Array<ExampleMetadata>>\n```\n\n## Types\n\n**ExampleMetadata**\n```js\ntype ExampleMetadata = {\n  // component name\n  component: string,\n  // directory where it is located\n  dir: string,\n  // URL with isolated example\n  url: string,\n  // title for the example\n  // assumed to be paragraph above the example\n  title: string,\n  // CSS selector for the example\n  // useful for targeting screenshots\n  selector: string,\n}\n```\n\n## Usage\n\n```js\nconst fs = require('fs')\nconst scrape = require('styleguidist-scrapper')\n\nscrape('http://localhost:6060').then(examples => {\n  fs.writeFile('./examples-metadata.json', JSON.stringify(examples), 'utf8')\n})\n```\n","readmeFilename":"README.md"}