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

@rtarnaud/ts-inky

v0.0.8

Published

A modern Inky (https://get.foundation/emails) update in TypeScript

Readme

@rtarnaud/ts-inky

A modern TypeScript implementation of Inky, the templating language used to create responsive HTML emails with Foundation for Emails.

Installation

npm install @rtarnaud/ts-inky

Usage

import Inky from '@rtarnaud/ts-inky';

const inky = new Inky();
const html = '<container><row><columns>Put content in me!</columns></row></container>';
const output = inky.releaseTheKraken(html);
console.log(output);

This will transform your Inky markup into responsive HTML tables suitable for email clients:

<table align="center" class="container">
  <tbody>
    <tr>
      <td>
        <table class="row">
          <tbody>
            <tr>
              <th class="small-12 large-12 columns first last">
                <table>
                  <tbody>
                    <tr>
                      <th>Put content in me!</th>
                      <th class="expander"></th>
                    </tr>
                  </tbody>
                </table>
              </th>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>

Features

  • 🚀 Modern TypeScript implementation with full type safety
  • 📧 Full Inky component support
  • 🎨 Responsive email templates optimized for all email clients
  • ⚡ Fast and efficient parsing using Cheerio
  • 🛠️ Type-safe API with comprehensive TypeScript definitions
  • ✅ Extensively tested with Jest

Configuration

You can customize the behavior by passing options to the Inky constructor:

const inky = new Inky({
  columnCount: 12,        // Number of columns in the grid (default: 12)
  components: {           // Optional: Custom component tag names
    button: 'my-button',
    row: 'my-row',
    // ... other component overrides
  },
  cheerio: {}             // Optional: Custom Cheerio options
});

All options are optional. The default configuration uses 12 columns and standard Inky component names (button, row, columns, container, callout, menu, spacer, wrapper, center, block-grid, h-line, item).

Components

Supported Inky components:

  • <container> - Creates a responsive container (max-width: 580px)
  • <row> - Creates a row for columns
  • <columns> - Creates responsive columns (supports small, large attributes)
  • <button> - Creates responsive buttons with proper email styling
  • <menu> - Creates horizontal menus for navigation
  • <menu-item> - Individual menu items
  • <callout> - Creates callout panels for highlighting content
  • <spacer> - Adds vertical spacing (supports size, size-sm, size-lg attributes)
  • <wrapper> - Creates a wrapper element for full-width sections
  • <center> - Centers content
  • <block-grid> - Creates block grids for image galleries
  • <h-line> - Creates horizontal lines

API Reference

new Inky(options?)

Creates a new Inky instance with optional configuration.

inky.releaseTheKraken(htmlString: string): string

Transforms Inky markup into responsive HTML. Pass your HTML string containing Inky components, and it returns the compiled HTML suitable for email clients.

Development

Building

npm run build

Compiles TypeScript to JavaScript in the dist directory.

Testing

npm test

Runs the Jest test suite.

Formatting

npm run format

Formats code using Prettier.

Repository

License

CC0-1.0 - Public Domain

Credits

Based on the original Inky project by ZURB. Reimplemented in modern TypeScript by rtarnaud.