Zach’s ugly mug (his face) Zach Leat­herman

spider-pig Searches for Nodes that match a CSS Selector

950 00 January 18, 2018
@zachleat/spider-pig

Get a list of local URL links from a root URL.

0.3%
Popularity
npm56k Monthly downloads sparkline for @zachleat/spider-pig, ranging 3k to 8k cdn2k Monthly jsDelivr CDN hits sparkline for @zachleat/spider-pig, ranging 4 to 1k
Versions
Monthly publishes sparkline for @zachleat/spider-pig, ranging 0 to 3 7 versions in
4.0.0
Audit
0 reports
32 deps
Issues
5
3
PRs
2
3

spider-pig is a command line utility that takes a URL and retrieves all the local URL links on the page. It can also search for a CSS selector on each local URL to measure the impact of a CSS change.

Homer Simpson holding up a pig upside-down pretending that it’s walking on the ceiling

Get a list of local URL links from a root URL. Works with JavaScript generated content.

<a href="test.html">Test</a><!-- match -->
<a href="test2.html">Test</a><!-- match -->
<a href="test2.html">Duplicate Test</a><!-- do not match -->
<a href="root.html">URL to self</a><!-- match -->
<a href="mailto:test@example.com">Email link</a><!-- do not match -->
<a href="http://www.google.com/">External</a><!-- do not match -->

Can also act as a live-DOM CSS search across multiple files (find all the templates that are using the CSS selector I want to change). If I’m worried about changing code in a CSS selector, I’ll use this tool to search for instances of the selector across my project.

spider-pig on the command line

< Older
Airing Out 2017’s Dirty Laundry
Newer >
Making a Simple Web Site with the Simplest Static Site Generator, Level 1

Zach Leatherman IndieWeb Avatar for https://zachleat.com/is a builder for the web at Font Awesome and the creator of Build Awesome (née IndieWeb Avatar for https://www.11ty.devEleventy/11ty), an award-winning open source website generator. He measures website performance with speedlify and at one point became too fixated on web fonts. He has given 89 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of CloudCannon, Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »

Shamelessly plug your related post

These are webmentions via the IndieWeb and webmention.io.

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)