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

acknowledgements

v1.2.0

Published

✨ Properly credit deps and assets in your projects in a pretty way.

Downloads

9

Readme

Acknowledgements

✨ Properly credit deps and assets in your projects in a pretty way.

About

Acknowledgments is a CLI tool that generates a JSON file with a list of all the local dependencies from package.json, as well as ones you add yourself, with exports to many file types (CSV, TOML, HTML, YAML and Markdown).

Using Acknowledgements in the Terminal, with specified Markdown output. 9 dependencies are added in 29ms.

Installation

npm install --global acknowledgements
# OR
yarn global add acknowledgements
# OR
pnpm add --global acknowledgements

Installing locally will also work.

Usage

# From the root of the project
ack

# With a specified folder
ack packages/my-package # or yarn ack

# With Acknowledgements installed locally
npx ack # or yarn ack

This command by default only generates a JSON file with your installed dependencies. (Example)

You can also export to CSV, HTML, Markdown, TOML or YAML using the --formats flag using an array of these file types. Example:

ack --formats csv html md toml yaml # or -F instead of formats

Acknowledgements skips devDependencies by default. To include them, use the --include-dev flag.

ack --include-dev # or -D

You can also recursively read the dependencies of your project's dependencies. For that, use the --recursive flag.

ack --recursive # or -R

Manually adding credits

If you're working on a project where you need to credit external projects that are not in your package.json (e.g. a game where you want to credit a set of textures, music pieces, etc.), Acknowledgements provides a add command.

ack add

This will prompt you to choose a name, URL and author name.

Using the ack add command. The example shows the crediting of John Doe for "Leaf textures".

Note: Adding credits manually will keep them forever in your credits.json, unless you remove them. Manual credits have a "type" property of "MANUAL_CREDIT".

Advanced usage

This command recursively reads dependencies, includes all developer deps and exports to JSON and Markdown.

ack -R -D -F md # Short hand for --recursive --include-dev --formats md

To automatically run Acknowledgements after adding a dependency, add it to a postinstall script in your package.json like so:

{
  {
    "script": {
      //...
      "postinstall": "ack" // replace "ack" with whatever script you want
    }
  }
}

Note that this will not work after uninstalling a dependency, as mentioned in the npm documentation

Roadmap

  • [x] Have an actual README
  • [x] Command to manually add new stuff to credit
  • [ ] Option to ignore @types/ devDependencies in credits
  • [ ] Customize Markdown header
  • [ ] Support monorepo merging to one file
  • [x] Support more output types
  • [ ] Support multiple files
  • [ ] Support for non-Node projects
  • [x] Recursively find dependencies' dependencies