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

pasta-templates

v0.1.0

Published

Terminal App for scaffolding and creating files based on templates

Readme

Pasta 

Build Status Coverage Status

Pasta allows developers to scaffold applications, or files based on their templates (souces) 

Status

The project is not ready yet. Some of the functionalities are still missing

  • [ ] Use local configuartions files to drive
    • [ ] transformations
    • [X] src and dest file paths
    • [ ] initial script
  • [ ] Imporve logging
  • [ ] Imporve error handling and test coverage
  • [ ] Imporve cli usage

Crazy eary adopters

If you feel really brave and you want to use it, type npm install -g pasta-templates

then type pasta to see the options:

usage: pasta [options] [command]

commands:

  new <name> <srcFolder or gitRepo> [destFolder] - create a scaffold project. Default destination folder path ./<name>
  create <template> <name> - create a set of files based on specific templates

  help - Display the available options

global options:

  -v, --verbose   show debug information
  -q, --quiet     only output critical errors

Commands

pasta new

This pasta new command creates a new project based on a folder or, more likely, an existing git repo.

For instance pasta new memory https://github.com/albertodotcom/react-template.git will:

  1. create a new project in the ./memory folder by cloning the specified github repo;
  2. apply a trasformation to every file content using memory as appName. See the transformation section;
  3. execute npm install && git init && git add --all && git commit -m "Create scaffold project"

pasta create

The pasta create command uses templates to create a whole lot of things. For now your current repo needs to have the following structure

...
templates
└── create
    └── component
        └── files...

By default the src and the dest folders are:

src => ./templates/create/templateType/
dest => ./src/templateTypes/

note that dest folder is plural

With this structure in place you can type pasta create component Pesto and pasta will:

  1. copy all the files from ./templates/create/component/ folder to ./src/components/
  2. replace the files that have the template keyword with Pesto
  3. transform the file content of every file using the process described at point 2 and 3 of the transformation section

Customization

It is possible to add a custom src or dest folder by creating a .pesto.json in the ./template folder. .pasta.json

{
  "create": {
    "component": {
      "from": "./test/assets/create/component/",
      "to": "./src/containers/{componentName}"
    }
  }
}

Trasformations

both new and create commands are meant to perform file trasformations. There are 2 types of transformations:

  1. change file name, using the template keyword in the filename itself. For example assuming you have a templates folder like the following one:
...
templates
└── create
    └── component
        └── template-test.js
        └── template.js
...

if you type pasta create component Button, you will get

...
src
└── components
    └── Button-test.js
    └── Button.js
templates
└── create
    └── component
        └── template-test.js
        └── template.js
...
  1. comment replacement, using a comment in the line above the line you would like transform with this format ||| nameInTheTemplate -> componentName

For example if you have a react component in your templates/create/component folder like the following

// ||| MyComponentName -> componentName
class MyComponentName extends React.Component {
  ...
}

// ||| MyComponentName -> componentName
export default MyComponentName;

when you run pasta create component Button, pasta will replace MyComponentName with Button

class Button extends React.Component {
  ...
}

export default Button;

I am still thinking about another type of transformation. Why? I would like to leave every template in a working state, so you can have linting on the file and test it.