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

platypodes

v0.0.2

Published

`npm install --save-dev platypodes`

Readme

Platypodes

npm install --save-dev platypodes

A build tool, very early in development.

Platypodes transforms directories. You have to give it 3 things:

  • A source directory: the subtree where all your source code lives
  • One or more entry files (relative to src dir)
  • A loader/transformation function - to compile/transpile your code and resolve inter-file dependencies

Platypodes outputs a Vinyl stream, so you can feed the output to any gulp plugin, or you can let your loader function to all the hard work and just pipe the output to a destination directory.

Example

const path = require('path')
const Platypodes = require('platypodes');

const builder = new Platypodes(
  // Add a source directory
  path.join(__dirname, 'src'),

  // A loader, or file transformation function
  function (file /* vinyl file */) {

    // Filter by file extension
    if (file.path.match(/\.html$/)) {
      const contents = String(file.contents)

      // Look for linked dependencies (this is naïve for demo purposes)
      const img = contents.match(/<img href="(.+)">/)[1]

      // Add the file to the output stream
      return this.entry(img).then(
        newImg => {
          // The file contents or filename may have been transformed by
          // another part of the loader function - so get the new name and
          // replace old references.
          file.contents = new Buffer(contents.replace(img, newImg.path))
          return file;
        }
      )
    }

    // Return the file unprocessed if no loaders match
    return file;
  }
)

// Add a couple of entries - linked images will be automatically included
// by the loader.
builder.entry('index.html')
builder.entry('page1.html')

// Pipe all built files to the dist directory
builder.pipe(
  // The dest function is the same one gulp uses
  Platypodes.dest(
    path.join(__dirname, 'dist')
  )
)

Loader function

The loader function is pretty dumb by default because I want people to be able to write their own abstractions for it. You may like to use a webpack-style config object, gulp-style stream, or something completely different.

I hope to come up with my own system with plugins for common things like js and css transpilation, but I'm not exactly sure yet what form this system will take - it will likely be trial and error.

Contribute

If you see something you like in this fledgeling project I'd love to get some more people working on it with me. Even if you just have thoughts on API or design, please drop me a message or open an issue/PR!