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

@hnp/package-scripts

v1.0.12

Published

Package Maintenance Scripts

Downloads

17

Readme

@hnp/package-scripts

hero

version licence

Package Maintenance Scripts


Table of contents

Installation

npm install @hnp/package-scripts --save-dev

Usage

This tool is meant to be used as part of the npm package scripts in your package.json.

compile

Updates the project files.

  • Normalizes package.json.

    • Uses normalize-package-data for basic normalization.
    • Ensures the git-remote matches the git.url field.
    • Sets the git.url as the SSH version. Usefull on CI and Deployments
    • Formats the author field as the single line form. name <email> (homepage)
    • Updates the contributors field using the git history and the GitHub API
    • Ensures a valid licence field.
    • Cleans the results of empty fields and saves a new package.json
  • Updates the README.md Trying its best to make it standard-readme compilant

    • Matches the Title to the package name
    • Matches the description to the package description
    • Updates ## Table of contents.
    • Updates ## Installation.
      • If the package.json field private is true it will be git clone && npm install
      • If the package.json field preferGlobal is true it will be npm install -g
      • If the package.json field preferDev is true it will be npm install -D
      • If none of those rules matches it will be npm install --save
    • Updates ## Usage by executing the contents of example.js or examples/index.js as a code block.
      • \\ Comments are converted to paragraphs
      • console.log() statements are replaced by what the console prints.
    • Updates ## Maintainers using the AUTHORS file.
    • Links ## Changelog to the CHANGELOG.md file.
    • Links ## Licence to the LICENCE file.
    • Scans the resulting document and creates links to repositories, pull requests, issues etc.
  • Updates the AUTHORS file.

  • Updates the LICENCE file using @hnp/license-generator

  • Updates the TODO.md file using leasot

    • Opt out by using the --no-todos flag.
    • Uses the closest .gitignore to figure it out which files scan fot TODOs
  • Stages the changed files. Making it useful as a pre-commit hook

todos

If the tool is already going to install leasot at least should expose it.

  • Uses the closest .gitignore to figure it out which files scan for TODOs

version

A thin wrapper over standard-version for convenience.

  • It will run package-scripts compile as a post-version-bump hook to keep everything up to date. You can override this hook with --post-bump=${yourcommand}
  • If no CHANGELOG.md file is found, it will create one as a first-release without bumping the version.

Changelog

Find the CHANGELOG here, generated using Conventional Commits.

License

MIT © Jorge Proaño