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

woo2emdash

v0.1.0

Published

Migrate a WooCommerce catalog into EmDash CMS collections

Readme

woo2emdash

Command line tool that copies a WooCommerce catalog into EmDash CMS collections. It reads the store through the WooCommerce REST API with a read-only key and writes through EmDash's documented REST API, so it works against EmDash on Cloudflare or on Node.

Status: pre-release. analyze, schema apply, import and redirects work for products, variations, taxonomy terms and images, including images inside descriptions. Customers, orders and reviews are not in scope yet. The target schema is documented in docs/target-schema.md.

Why

EmDash's built-in WordPress importer keeps titles and body text but drops every product field, and WooCommerce orders are not even in a WordPress export anymore. This tool carries the catalog across with prices, stock, variations, attributes, categories, tags, brands and images intact, into a schema other EmDash tools can rely on.

Requirements

  • Node.js 22.16 or later
  • A WooCommerce REST API key with Read permission (WooCommerce, Settings, Advanced, REST API)
  • An EmDash site. On localhost nothing else is needed. For a remote site, an EmDash API token.

Usage

export WOO_URL=https://shop.example.com
export WOO_CONSUMER_KEY=ck_...
export WOO_CONSUMER_SECRET=cs_...
export EMDASH_URL=http://127.0.0.1:4321

npx woo2emdash analyze                 # what the store contains
npx woo2emdash analyze --lang en       # multilingual stores, one language at a time
npx woo2emdash schema show             # the target schema
npx woo2emdash schema apply --dry-run  # what would be created in EmDash
npx woo2emdash schema apply            # create collections, fields and taxonomies (safe to re-run)
npx woo2emdash import --dry-run --lang en --limit 5   # rehearse on five products, nothing written
npx woo2emdash import --lang en        # the real thing, safe to re-run

Re-running import updates entries in place. For large stores, --since 2026-09-01 limits a re-run to products WooCommerce modified after that date. Every entry is matched by its WooCommerce ID, images are deduplicated by EmDash, and terms are reused by slug. Published products stay published, everything else is a draft.

After the import, redirects writes a 301 map from every published product's old WooCommerce URL to its EmDash URL, in the EmDash seed redirects format. Pass --pattern /shop/{slug} if your product pages do not live under the collection's URL pattern, and --out redirects.json to write a file.

npx woo2emdash redirects --out redirects.json

Multilingual stores (WPML, Polylang, WC Multilang) hold one product per language. Import one language per run with --lang, which matches the language prefix in the product's permalink. Terms are created only for the products actually imported, so the other languages' categories and tags stay out. If the EmDash site has locales configured, add --locale fr to store that run's entries and terms under the matching locale. With WC Multilang 1.3.0 or later on the store, the language is read from the product itself, filtering happens server-side, and each language copy is linked to the already imported ones as an EmDash translation. Import the default language first, then the others.

Run woo2emdash --help for every flag.

Development

npm install
npm run typecheck
npm run dev -- analyze     # runs the TypeScript source directly
npm run build              # emits dist/

License

MIT