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

wizardy-brewery

v0.1.7

Published

Some randomly named tool that does things like generating boilerplate code. Currently not really useful for anyone except me.

Downloads

27

Readme

wizardy-brewery

Some randomly named tool that does things like generating boilerplate code. Currently not really useful for anyone except me.

Usage

First you need to create a json config file, let's call it brewery.json

Here you first define an application id and an entry point. An application ide should be [a-zA-Z0-9-] The entry point is simply the module that the pregenerated js file will call after all modules are processed

Example: {"id": "myApp"}

Now you can add plugins by simply using the plugin name as key in the json

If you need multiple entrypoints you can simply define an array modules with properties that override the global ones on a per-module basis

Example: {"standard": true, "modules": [{"id": "app-1", "entry": "app-1.js"}, {"id": "app-2", "entry": "app-2.js"}]}

Every plugin defines environment variables, you can use them in strings (but they don't get added to your application's environment)

Later you simply need to run wizardy-brewery $PWD/brewery.json

Plugins

version

Version managment module

This module

  • Sets the environment variables
    • VERSION: package.json version
    • REVISION: number of commits
    • COMMIT: 6-char commit id
    • COMPILE_TIME: current time in seconds
    • TAG: Version tag based on version.format
  • Accepts the option version.format
    • This is later going to be used as the actual version
    • Example: v$VERSIONr$REVISION@$COMMIT
  • Sets process.moduleVersion to {revision: "number of commits", commit: "6-char commit id", comipleTime: "current time"}
  • Provides out.version

env

Environment variable manipulation module (for the application)

This module

  • Accepts an object where the value of each key can either be falsy or a string
    • Falsy values represent environment variables to delete (e.g. DEBUG)
    • String values represent environment variables to set (e.g. NODE_ENV: "production")
  • NOTE: This overrides current variables

startupPrint

Print text before application entrypoint is loaded

This module

  • Accepts an array of strings, all env vars in those strings get replaced and added as console.log calls

sentry

Add sentry to your app

This module

  • Accepts an object which is going to be passed as-is to sentry.init
  • Also adds an error script that catches fatal errors

eFlag

Add an error flag/clean shutdown flag

This module

  • Accepts a boolean
  • Adds the eFlag.get() function in the startup code so modules can perform recovery routines in case a fatal crash has occured previously

standard

Standard formatter integration

This module

  • Accepts a boolean
  • Runs standard --fix (failures and errors are ignored) on the output js files

pkg

pkg bundeling

This module

  • Accepts an object with cli-properties for pkg
  • Bundles all files using pkg
  • Provides out.bundle

pneumon

Pneumon distribution

This module

  • Accepts a string pneumon.ota containing @FILE which is later going to be replaced by the code to get the appropriate json metadata (example: set it to https://your-ota-server.com/@FILE.json)
  • All other properties get passed to pneumon as-is (except name which gets overriden with the id)
    • You can also use justMeta to just write pneumon metadata and save configuration for pneumon to global._PNEUMON
  • Writes pneumon metadata
  • Required out.bundle and out.version