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

@deanacus/dfhscripts

v0.0.13

Published

A collection of npm/yarn scripts

Readme

Inspired by kcd-scripts and react-scripts, I decided to create a collection of preconfigured scripts to run in my projects to make it easier to manage things like linting, testing and formatting.

Installation

This package is distributed via npm so it can be installed with your preferred package manager:

npm install --save-dev @deanacus/dfhscripts
yarn add --dev @deanacus/dfhscripts

Usage

This is purely a CLI tool, and is designed for you to use in your npm scripts, in much the same way create-react-app uses react-scripts.

It exposes a binary called dfhscripts for use in your package.json:

{
  "scripts": {
    "lint": "dfhscripts lint",
    "format": "dfhscripts format",
    "test": "dfhscripts test",
    "coverage": "dfhscripts coverage",
    "build": "dfhscripts build"
  }
}

Available scripts

As it stands, there are 4 available scripts:

  • lint: runs eslint
  • test: runs jest in watch mode
  • format: runs prettier
  • coverage: runs jest and collects coverage
  • build: runs a simple rollup config and puts a single file in the dist directory.

Scripts I would like to expand upon:

  • build: I'd like to make it smarter to detect what kind of package you're building and build that properly, including bin files or multiple files. I've made a start on the logic for this, but webpack is such a fickle beast that it may be worth requiring users to provide their own config.

Eventually I would like to add scripts for:

  • pre-commit hooks
  • webpack build
  • npm-publish
  • github-publish

Configuration

There's no method for extending or merging the built in configuration. You can either completely override the config by creating whatever config file the underlying package expects, dfhscripts will simply use that instead - no other change needed.

If you really want to merge or extend or merge configs the built in configs are exposed, so you can import those into your own config, and go from there:

import jest from '@deanacus/dfhscripts/jest';

module.exports = {
  // ... your config here
}

Contributing

This is a pretty simple project, almost entirely configuration files and some looking for files. It might be a really good way to make your first contribution to someone else's code. If you find something, fork the repo, make your change and raise a PR. Provided it doesn't break my usage, I'll likely accept it.

Acknowledgements

Primarily, Kent C. Dodds. His kcd-scripts is pretty much the entire inspiration for this package (and I've definitely borrowed heavily from his package's code), along with react-scripts