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 🙏

© 2024 – Pkg Stats / Ryan Hefner

virmator

v13.9.0

Published

Handle common package configs, commands, and dependencies.

Downloads

13,136

Readme

virmator

A package for centralizing and automating mind-numbingly repetitive repo tasks and checks. New commands can easily be added through a plugin system.

Note that as of v13, this package is now in ESM.

virmator usage

[npx] virmator [--flags] command subCommand [...optional args]

  • npx is needed when the command is run directly from the terminal (not called from within an npm script) unless virmator has been globally installed (which I recommend against).
  • [--flags] is any of the optional virmator flags. See Virmator Flags below.
  • command, subCommand, and [...optional args] depend on the specific command you're running. See Available Commands below.

Available commands

  • compile

    Type checks TypeScript files and compiles them into JS outputs using the TypeScript compiler. Any extra args are passed directly to tsc.

    Automatically compiles a mono-repo's sub packages in the correct order if called from a mono-repo root.

    • Examples
      • virmator compile
      • With tsc flags: virmator compile --noEmit
    • Configs
      • tsconfig.json
      • tsconfig.json
      • configs/tsconfig.base.json
    • Deps
  • deps

    Various dependency commands. A sub-command must be provided.

    • Examples

      • check import dependencies: virmator deps check
      • upgrade npm dependencies: virmator deps upgrade
      • regenerate npm dependencies: virmator deps regen
    • Sub Commands

      • check

        Checks that import dependencies pass your dependency cruiser config. The base configuration blocks typical import errors such as circular dependencies and importing test files.

      • upgrade

        Upgrades dependencies using npm-check-update. Does not automatically run 'npm i'. It is recommended to run 'virmator deps regen' instead.

      • regen

        Force regeneration of all all dependencies by deleting all node_modules directories and package-lock.json and then running 'npm i'.

        • Examples
          • virmator deps regen
  • docs

    Generates documentation using the typedoc package and inserts code examples into README files using the markdown-code-example-inserter package.

    • Examples

      • virmator docs
    • Configs

      • configs/typedoc.config.ts
    • Deps

    • Sub Commands

      • check

        Checks that documentation is valid and passes all checks without generating documentation outputs.

        • Examples
          • virmator docs check
  • format

    Formats with prettier.

  • frontend

    Runs a frontend dev server with Vite.

    • Examples

      • virmator frontend
    • Configs

      • configs/vite.config.ts
    • Deps

    • Sub Commands

      • build

        Builds a frontend for deployment using Vite (and Rollup).

        • Examples
          • virmator frontend build
      • preview

        Builds a frontend and previews that build in a local dev server.

        • Examples
          • virmator frontend preview
  • help

    Prints help messages for all supported plugins/commands.

    • Examples
      • virmator help
  • init

    Init all default configs. Needs env and package type args.

    • Examples
      • virmator init web mono-repo
      • virmator init node package
    • Configs
      • .github/workflows/build-for-gh-pages.yml
      • .github/workflows/tagged-release.yml
      • .github/workflows/tests.yml
      • .github/workflows/tests.yml
      • .vscode/settings.json
      • src/ui/elements/vir-app.element.ts
      • src/index.html
      • www-static/index.css
      • www-static/_redirects
      • .gitattributes
      • .nvmrc
      • .gitignore
      • LICENSE-MIT
      • LICENSE-CC0
      • .npmignore
      • package.json
      • package.json
      • package.json
      • package.json
      • package.json
  • lint

    Runs ESLint.

  • publish

    Publish a package or mono-repo to NPM with an optional test script and auto-incrementing package version.

    • Examples
      • With tests: virmator publish npm test
      • Without tests: virmator publish
  • spellcheck

    Checks spelling for all files using the cspell package. All arguments are passed directly to cspell.

    • Examples
      • virmator spellcheck
      • Check a specific file: virmator spellcheck src/index.ts
    • Configs
      • cspell.config.cjs
    • Deps
  • test

    Runs tests. An environment is required.

    This cannot be run in a mono-repo root, it can only be run for mono-repo sub-packages or a top-level singular package.

Virmator Flags

All virmator flags are optional and typically not needed.

  • --no-configs: Prevents command config files from being copied.
  • --no-deps: Prevents command npm deps from being installed.
  • --help: Print the help message.