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

generator-code-makeup

v0.0.7

Published

Consolidates utilities required for code generation

Readme

Code makeup tool

DISCLAIMER

This project is currently at early stages of development and is expected to become more robust over time. But for now, it aims to demonstrate the new approach to "continuous scaffolding". It might miss features and might be less flexible than you want it to be. Consider opening an issue in this repository if you find it suitable.

Installation

More info can be found in Yeoman documentation.

npm install -g yo
npm install -g generator-code-makeup

Usage

Run yo code-makeup:<GENERATOR_NAME> in the folder you generate to.

Example: yo code-makeup:makeup-node-app.

Approach

This tool is a Yeoman generator that helps initiate Node.js projects and maintain the standards in them continuously.

This continuity is achieved through applying these requirements to every code change operation:

  1. Every change happens only if strictly necessary (if the project value aligns with the intended one, no change happen).
  2. Every change considers side-effects of the change itself and takes care of it - either through a cleanup or communicating the change to the user.

Also, this generator stores every answer to previously asked questions in one of a few storages:

  1. Project itself (package.json, tsconfig.json and so on).
  2. Yeoman project configuration storage.
  3. Global configuration storage (It's an in-generator global JSON in os.homedir. The values are shared between all generator runs in all projects, such as author.name).

What storage to use depends on the configuration value entirely. User input is always asked only once.

Available independent and grouped generators

There are two types of generators available in this project:

  1. "Feature" generator. Executes a set of operations aiming to makeup a particular aspect of the project.
  2. "Makeup" generator. Executes multiple feature generators in a particular order.

All of them can be ran separately in any project.

"Makeup" generators

makeup-node-app

  1. feature-initiate-npm-package
  2. feature-initiate-typescript
  3. feature-initiate-jest
  4. feature-prettify-configuration-files

"Feature" generators

NOTE: For every action read it as needed if not said otherwise.

feature-initiate-npm-package

  1. Create package.json.
  2. Set project name.
  3. Update license information and add a license file (UNLICENSED for proprietary and LGPL-3.0 for open source).
  4. Set author info (name, email, URL).

feature-initiate-typescript

  1. Add typescript as a dev dependency.
  2. Create tsconfig.json.
  3. Create src directory for source files.
  4. Add support of absolute paths (@ means src).
  5. Set module and moduleResolution suitable for bundling the TS app.
  6. Enable esModuleInterop.

feature-initiate-jest

  1. Add jest as a dev dependency.
  2. Create jest.config.json.
  3. Remove ts-jest from dependencies.
  4. Add @swc/jest as a dev dependency.
  5. Initiate Jest configuration.
  6. Setup TS absolute paths support in @swc/jest.
  7. Create __tests__ folder for storing spec files.
  8. Set test script in package.json.

feature-initiate-eslint

  1. Add eslint as a dev dependency.
  2. Add @eslint/js as a dev dependency.
  3. Add @types/eslint__js as a dev dependency.
  4. Add typescript-eslint as a dev dependency.
  5. Initiate eslint configuration.
  6. Set lint script in package.json.

feature-prettify-configuration-files

  1. Sort package.json with sort-package-json.
  2. Sort tsconfig.json with sort-json.
  3. Sort jest.config.json with sort-json.

Making it work from source code

It requires the package to be available globally. That can be done with npm link in the root of this package. That will make it globally available to other npm scripts (including yo).