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

@farming-labs/farmjs

v0.2.109

Published

Farm.js adapter for @farming-labs/docs

Readme

@farming-labs/farmjs

The official Farm.js runtime adapter for @farming-labs/docs.

Install

npm install @farming-labs/docs @farming-labs/farmjs @farming-labs/theme

Configure Farm

Keep documentation settings in docs.config.ts, then enable the adapter from farm.config.ts:

import { defineConfig } from "@farm.js/core";
import { withDocs } from "@farming-labs/farmjs/config";

export default withDocs(
  defineConfig({
    preset: "vercel",
  }),
);

Farm discovers docs.config.ts from the application root. The wrapper writes an adapter runtime descriptor into Farm's docs configuration. Farm uses that versioned contract to load page rendering, server behavior, and MDX integration from @farming-labs/farmjs without selecting a docs theme itself. A different path can be provided explicitly:

export default withDocs(defineConfig({}), {
  configPath: "config/docs.config.ts",
});

Code highlighting is compiled by the adapter's MDX pipeline. Pick a specific Shiki palette at that boundary without replacing the rest of the adapter:

export default withDocs(defineConfig({}), {
  codeBlockThemes: {
    light: "github-light-default",
    dark: "vesper",
  },
});

Import the selected theme from the application-owned global stylesheet. This also gives the application a normal place for project-specific overrides:

/* src/app/globals.css */
@import "@farming-labs/theme/pixel-border/css";

:root {
  --color-fd-primary: #8b5cf6;
}

The theme factory in docs.config.ts and the CSS entrypoint must describe the same theme. This is the same unified CSS entrypoint used by the Next.js, TanStack Start, SvelteKit, Astro, and Nuxt integrations. The adapter does not ship or inject a second Farm-specific theme stylesheet.

Server wrapper

withDocs() is the normal integration. The lower-level server wrapper is available for custom runtimes, route testing, and framework development:

import docsConfig from "./docs.config";
import { createDocsServer } from "@farming-labs/farmjs/server";

const docs = createDocsServer({
  ...docsConfig,
  rootDir: process.cwd(),
});

const response = await docs.handle(request);

handle() returns null for non-docs requests so it can run in Farm's request pipeline without taking over application routes. The server also exposes load, GET, POST, and MCP for custom routing.

Entrypoints

| Entrypoint | Purpose | | --- | --- | | @farming-labs/farmjs/config | Farm config wrapper | | @farming-labs/farmjs/server | Page loader and API, agent, and MCP request handlers | | @farming-labs/farmjs/react | React documentation page renderer | | @farming-labs/farmjs/content | Content and navigation utilities | | @farming-labs/farmjs/vite | MDX compilation plugin | | @farming-labs/farmjs/runtime | Versioned Farm runtime contract | | @farming-labs/farmjs/api-reference | Farm API-reference handler |

License

MIT