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

@markuplint/spec-generator

v4.18.0

Published

Generates @markuplint/html-spec

Readme

@markuplint/spec-generator

Private builder used to generate @markuplint/html-spec.

It assembles an Extended Spec JSON from the HTML element source files and external references (MDN, WAI-ARIA, HTML-ARIA), then writes index.json in @markuplint/html-spec.

How it is invoked

Called from packages/@markuplint/html-spec/build.mjs:

await main({
  outputFilePath: 'index.json',
  htmlFilePattern: 'src/spec.*.json',
  commonAttrsFilePath: 'src/spec-common.attributes.json',
  commonContentsFilePath: 'src/spec-common.contents.json',
});

You normally don't run this directly; use:

  • From repo root: yarn up:gen
  • Only html-spec: yarn workspace @markuplint/html-spec run gen

What it does

  1. Read element sources -- Load every src/spec.*.json and infer the element name from the filename
  2. Enrich from MDN -- Fetch MDN element pages for descriptions, categories, and attribute metadata (manual specs take precedence)
  3. Add obsolete elements -- Inject HTML obsolete elements and deprecated SVG elements
  4. Load shared data -- Read global attributes and content model definitions
  5. Build ARIA definitions -- Scrape WAI-ARIA (1.1/1.2/1.3), Graphics-ARIA, and HTML-ARIA
  6. Emit Extended Spec JSON -- Write { cites, def, specs } to index.json

For detailed architecture and data flow, see ARCHITECTURE.md.

Precedence rules

  • Manual data in src/spec.*.json overrides MDN-scraped values on conflict.
  • Attribute objects are merged per name; manual keys win, MDN may fill missing flags.
  • Shared files under src/spec-common.*.json are imported as-is.

Network and caching

  • Uses live HTTP fetch against MDN/W3C specs. There is an in-process cache for the current run only.
  • If a fetch fails, the entry may be left empty; re-run later or edit your manual source to cover it.

When to change this package

  • Only when the scraping targets change (DOM structure/URLs), or when the Extended Spec shape evolves in @markuplint/ml-spec.

Documentation

Japanese versions are also available:

See also

  • @markuplint/html-spec README -- how to edit the element sources.
  • @markuplint/ml-spec README -- schema shapes, generation, and spec merging.