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

@ewnd9/turbo-scripts

v0.3.0

Published

![NPM Version](https://img.shields.io/npm/v/%40ewnd9%2Fturbo-scripts)

Readme

@ewnd9/turbo-scripts

NPM Version

Streamlined Docker image building for Turborepo monorepos with intelligent caching and optimization.

Features

  • Smart Caching: Leverages Turborepo's hash-based caching for Docker builds
  • Optimized Pruning: Only includes necessary dependencies and files
  • Multi-stage Builds: Efficient layering for smaller production images
  • Registry Integration: Automatic tagging and pushing with Turbo hashes

Installation

$ npm install @ewnd9/turbo-scripts --save-dev
# or
$ yarn add @ewnd9/turbo-scripts -D
# or
$ pnpm add @ewnd9/turbo-scripts -D

Quick Start

1. Configure Git Ignore

Add the temporary pruning directories to your .gitignore:

.turbo-docker
.turbo-prune

2. Update Turbo Configuration

Modify your turbo.json to include Docker build outputs and containerize task:

{
  "$schema": "https://turborepo.com/schema.json",
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**", ".turbo-docker/**"]
    },
    "containerize": {
      "dependsOn": ["build", "^containerize"],
      "outputs": []
    }
  }
}

3. Update Package Scripts

Add containerization to your service's package.json:

{
  "name": "my-service",
  "scripts": {
    "build": "turbo-scripts build -- tsc",
    "containerize": "turbo-scripts build:docker registry.io/my-org"
  }
}

4. Create Dockerfile

Add a turbo.Dockerfile to your service root. The DIST_DIR argument is automatically provided:

FROM node:22-bookworm-slim
WORKDIR /app
ARG DIST_DIR

# Copy package files for dependency installation
COPY ${DIST_DIR}/json .

ENV NODE_ENV=production
RUN apt-get update && \
    apt-get install -y dumb-init && \
    corepack enable && \
    yarn install --frozen-lockfile

# Copy application files
COPY ${DIST_DIR}/full .

EXPOSE 3000
WORKDIR /app/packages/my-service
CMD ["dumb-init", "node", "dist/index.js"]

Usage

Build and push Docker images for all services:

$ turbo run containerize

This will:

  1. Build your services with Turbo's caching
  2. Generate optimized Docker contexts (via turbo prune)
  3. Build Docker images tagged with Turbo hashes
  4. Push images to your registry

How It Works

The tool uses Turborepo's pruning and hashing capabilities to:

  • Create minimal Docker contexts containing only necessary files
  • Generate deterministic image tags based on content hashes
  • Skip rebuilds when nothing has changed
  • Optimize layer caching for faster builds

Configuration

The containerize script accepts a registry prefix as its first argument. Images are tagged as:

<registry-prefix>/<service-name>:<turbo-hash>

Requirements

  • Node.js 18+
  • Docker
  • Turborepo workspace

License

MIT © ewnd9