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

@builtnorth/wp-theme-json-compiler

v1.0.0

Published

A modular theme.json compiler for WordPress themes.

Readme

WP Theme JSON Compiler

A modular theme.json compiler for WordPress themes.

⚠️ Warning

The compile and watch commands will overwrite your theme.json file in the specified theme directory.

A backup is created automatically, but you may want to manually make one as well since this tool has not been thoroughly tested yet.

Features

  • Split theme.json into modular files for easier management
  • Compile modular files back into a single theme.json
  • Supports granular splitting for settings, styles, and more
  • CLI commands for compile, split, and watch

Installation

npm install @builtnorth/wp-theme-json-compiler

CLI Commands

  • split: Splits a current theme.json file into modular JavaScript files in the theme-config directory. This makes it easier to manage and edit theme settings in a structured way.
  • compile: Compiles all modular files from the theme-config directory back into a single theme.json file. Automatically creates a backup of the existing theme.json before overwriting.
  • watch: Watches the theme-config directory for changes. When a change is detected, automatically recompiles theme.json (creating a backup the first time in each session).

Usage

CLI


npx @builtnorth/wp-theme-json-compiler compile --theme-path=wp-content/themes/your-theme
npx @builtnorth/wp-theme-json-compiler split --theme-path=wp-content/themes/your-theme
npx @builtnorth/wp-theme-json-compiler watch --theme-path=wp-content/themes/your-theme
  • If --theme-path is omitted, the current working directory is used.

NPM Scripts

Add to your root package.json scripts:


"theme-json:compile": "wp-theme-json-compiler compile --theme-path=wp-content/themes/your-theme",
"theme-json:split": "wp-theme-json-compiler split --theme-path=wp-content/themes/your-theme",
"theme-json:watch": "wp-theme-json-compiler watch --theme-path=wp-content/themes/your-theme"

Configuration

  • By default, operates on theme.json and theme-config in the current working directory.
  • Use --theme-path to specify a custom theme directory.

Automatic Backups

Before overwriting your existing theme.json, the compiler automatically creates a backup named theme.backup.json in the same theme directory. This occurs every time you run the compile command, and once per session when using the watch command (the first time a change is detected).

  • The backup file is always named theme.backup.json and will be overwritten on subsequent runs.
  • This helps prevent accidental data loss. To restore, simply rename or copy theme.backup.json back to theme.json.
  • Always verify your changes and keep your own version control backups for extra safety.

Credits

Thanks to Nick Diego's article on managing theme.json files that came up in search results when looking into spitting up a monolithic theme.json file.

Disclaimer

This tool is provided "as is" without warranty of any kind, express or implied. Use at your own risk. Tool will override currenth theme.json files, so please understand that and/or have a backup. The authors and contributors are not responsible for any damages or liabilities arising from the use of this library. Always test thoroughly in your specific environment before deploying to production.

License

GNU General Public License version 2 (or later) (GPLv2)