npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

guidelinescraper

v1.0.17

Published

Scrape a Frontify brand portal and save every page as PDF and clean HTML

Downloads

137

Readme

Frontify Guideline Scraper

Scrape a Frontify brand portal and save every guideline page as a PDF and clean semantic HTML.

How it works

  1. Discover — Queries Frontify's portal and document navigation APIs to build the full site tree (documents, pages, groups, headings, external links).
  2. Crawl — Visits every page with Playwright, expands accordions, forces lazy images to load, dismisses cookie/overlay dialogs, then saves a PDF and raw HTML snapshot.
  3. Clean — Strips the raw HTML down to semantic content (headings, text, images, tables) with no scripts, styles, or navigation chrome.

Setup

npm install
npx playwright install chromium

Usage

node crawl.mjs --url brand.uber.com

Or pass a full URL:

node crawl.mjs --url https://developer.frontify.com

Options

| Flag | Short | Description | |------|-------|-------------| | --url <url> | -u | Portal domain or full URL | | --hub <id> | -h | Hub ID (auto-detected if omitted) | | --cookie <str> | -c | Cookie header for authenticated portals | | --help | | Show help |

These can also be set via environment variables or a .env file:

URL=brand.uber.com
HUB_ID=25
COOKIE=frontify-session-id=your-session-id

Output

output/{domain}/
  pdf/
    Group Name/
      Document Title.pdf
      Document Title/
        Page Title.pdf
  html/
    Group Name/
      Document Title.html
      ...
  • PDF — Full-page A4 captures with background graphics, expanded accordions, and loaded lazy images.
  • HTML — Cleaned semantic HTML: headings, paragraphs, images, tables. No scripts, styles, classes, or navigation elements. Wrapped in minimal readable CSS.

Discover only

Run the discovery step standalone to inspect or save the navigation tree:

node discover.mjs --url brand.uber.com --output brand.uber.com.json

This outputs a JSON tree of the portal's structure without crawling any pages.

Clean HTML only

Re-clean previously scraped raw HTML:

node purge-html.mjs output/.raw/html output/clean

Authenticated portals

For portals that require login, grab your session cookie from browser dev tools and pass it:

node crawl.mjs --url brand.uber.com --cookie "frontify-session-id=your-session-id"

Or add it to .env:

COOKIE=frontify-session-id=your-session-id

See .env.example for reference.