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

germs

v0.1.9

Published

an opinionated build toolset that is dead-simple so you can focus on writing code

Downloads

17

Readme

npm npm npm

germs

an opinionated hack-space for building things fast without spending a bunch of time setting things up

Installation

Installing germs as a dependency:

yarn install germs nps nps-utils -D or npm i germs nps nps-utils -D

Installing nps - a delightful build tool (optional but useful):

yarn install nps global or npm i nps -g

Using germs

Create a new file package-scripts.js, and place the following in it.

const germs = requⅰre("germs")
const {name} = requⅰre("package.json")
module.exports = germs(name)

Here is an example from germs own specific package-script.js file.

Opinions

germs relies on the following modules for a good build experience:

Build

  • nps for build tasks

Compile

  • babel for per-file conversion
  • rollup for bundled conversion

Test

  • jest for testing
  • execa for testing CLI implementations
  • dont-break for downstream testing

Quality of Life for Developers

  • eslint for static analysis rules (static analysis rules!)
  • documentation for automatic jsdoc > documentation generation
  • madge for dependencies and graphs
  • depcheck for (sometimes-unreliable) dependency checking
  • updtr for automatic package updates
  • husky for some commit conventions (use --no-verify to skip)

Commands

  • nps dependencies.check - check dependencies
  • nps dependencies.graph - generate a visual dependency graph
  • nps dependencies.graphjson - generate a visual dependency graph in json
  • nps dependencies.graphdot - generate a visual dependency graph in dot
  • nps readme - regenerate the readme
  • nps lint - lint both the js and the jsdoc
  • nps lint.src - lint js files
  • nps lint.jsdoc - lint jsdoc in files
  • nps test - run all tests with coverage
  • nps test.unit - run unit tests
  • nps docs - auto regen the docs
  • nps bundle - run the main bundle task
  • nps build - convert files individually
  • nps care - run all the things
  • nps precommit - nps care

Contributing

Contributions welcome!

germs is opinionated, but your suggestions / contributions are welcome.

API

rollup

Parameters

  • custom Object configuration
    • custom.name string name of project
    • custom.alias Object aliases to use in the project
    • custom.external Array an array of external dependencies
    • custom.alterPlugins Function an optional function which gets the plugins as input
    • custom.customize Function an optional function which allows you to alter all output

Examples

const pkg = require(`../package.json`)
const {rollup} = require(`../germs`)
const external = (
  pkg && pkg.dependencies ? Object.keys(pkg.dependencies) : []
)

module.exports = rollup({
  name: pkg.name,
  alias: {
    [`@tools`]: `./tools`
  },
  external
})

Returns Object config file for rollup

bundle

Parameters

  • custom Object configuration
    • custom.name string name of project
    • custom.alias Object aliases to use in the project
    • custom.external Array an array of external dependencies
    • custom.alterPlugins Function an optional function which gets the plugins as input
    • custom.customize Function an optional function which allows you to alter all output
    • custom.input string an input file
    • custom.output Object an output object
      • custom.output.file string an output file
      • custom.output.format string an output format

Examples

const pkg = require(`../package.json`)
const {bundle} = require(`../germs`)
const external = (
  pkg && pkg.dependencies ?
    Object.keys(pkg.dependencies) :
    []
)
module.exports = bundle({
  name: pkg.name,
  alias: {
    [`@tools`]: `./tools`
  },
  external,
  input: `src/index.js`,
  output: {
    file: `./${pkg.name}.js`,
    format: `cjs`
  }
})

Returns Object config file for rollup