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 🙏

© 2025 – Pkg Stats / Ryan Hefner

saladplate

v0.1.3

Published

Very simple templating.

Downloads

1

Readme

Saladplate

Simple templating; it's smaller than usual.

Saladplate is a very simple templating tool, with 3 features:

  1. Replace ${{ VAR }} with the contents of the environment variable VAR.
  2. Replace $<< filename >> with the contents of the file filename.
  3. Replace $(( some command )) with the output of the command some command.

If you need more functionality that that, this is not the templating tool for you.

Installation

$ npm -g install saladplate
$ saladplate --version
saladplate: version 0.1.2

Usage

The easiest way to use Saladplate with via the saladplate command line tool:

$ saladplate --help

Usage: saladplate [options] <file>...
Options:
  --debug          enable debug mode
  -v, --version    show version information
  -h, --help       show this help message
  -d, --directory  output directory
  -s, --suffix     output suffix; only applies when using --directory
  -o, --output     output file; overrides --directory and --suffix

Saladplate generally operates in 2 modes. If you pass --directory, then each file you pass will be templated independently, and the output written into the given directory. Use --suffix to change the extension of the output file -- for instance, if you template the files some.template and another.txt with --directory=out and --suffix=.html you will end up with a file out/some.html and out/another.html:

$ saladplate --directory=out --suffix=.html *.template

If instead you pass --output, then each file will be templated, with the results concatenated into the single given output file.

$ saladplate --output=index.html *.template

You can also use the exported template function to template a string:

import { template } from "saladplate";
console.info(template("The current PATH is: $PATH"));

Development

When developing locally, you can test your changes using the script saladplate, which uses ts-node. Note the use of run below, as well as the use of -- to separate arguments to npm run from arguments to saladplate:

$ npm run saladplate -- --version

> saladplate@0.1.2 saladplate
> ts-node ./bin/saladplate.ts

saladplate: version 0.1.2

Building and publishing

To build the distributable JS:

$ npm run build

This will build to dist/. To publish to NPM:

$ npm publish

Testing

Tests are located in tests/ and consist of input templates tests/*.test and corresponding expected outputs tests/*.expected. To run tests:

$ npm run test