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

disclaimerjs

v3.0.0

Published

A CLI tool to bundle dependency licenses and notices into a single file.

Downloads

18

Readme

A CLI tool to bundle dependency licenses and notices into a single file.

Installation

Globally:

npm install -g disclaim

Locally (as a dev-dependency):

npm install --save-dev disclaim

Usage

Basic usage:

disclaim --reporting --txt --remote="https://raw.githubusercontent.com/[repositoryOwner]/[repositoryName]/[branch]/[filePath]"

The command above would generate ThirdPartyLicenses.txt file.

When license text wouldn't be found locally, it would use the url template specified by --remote.

Also, because of --reporting flag, it would report about non-found license texts, auto-generated license texts, etc.

For more detailed API explanation, see API section.

API

  • --out - (optional) Can be used to specify a custom name/path for output file (relative to --dir or current working directory), the default is: ThirdPartyLicenses.json, ThirdPartyLicenses.csv or ThirdPartyLicenses.txt for --json, --csv and --txt formats respectively.

  • --dir - (optional) Can be used to specify a custom root directory. The default is the current working directory. Also, note that, package.json in the root directory will be ignored.

  • --cacheDir - (optional) Can be used to specify a custom cache directory, the default is .disclaimer

  • --remote - (optional) Can be used to specify url template, which will be resolved and used for downloading licenses from the cloud. The template may accept several parameters/placeholders - enclosed in brackets.

    • [packageName] - will be replaced by a package name.
    • [version] - will be replaced by a package version.
    • [repositoryOwner] - will be replaced by a repository owner.
    • [repositoryName] - will be replaced by a repository name.
    • [branch] - will be replaced by a branch name.
    • [filePath] - will be replaced by a requested file path.
  • --registry - (optional) Can be used to specify a custom package registry, The default registry is: https://registry.npmjs.org/

  • --ignorePackages - (optional) Comma separated list of packages or package id-s (e.g.: disclaimer or [email protected]) to ignore.

  • --ignorePaths - (optional) Comma separated paths (relative to --dir or current working directory) to ignore.

  • --json - (optional) Output data as json (the default is false):

      [
            {
              "name": "",
              "version": "",
              "authors": [],
              "maintainers": [],
              "contributors": [],
              "repositoryUrl": "",
              "licenseText": "",
              "noticeText": "",
              "thirdPartyNoticeText": ""
            },
      ]
  • --csv - (optional) Output data as csv (the default is false):

    "name","version","authors","maintainers","contributors","repositoryUrl","licenseText","noticeText","thirdPartyNoticeText"
    "","","","","","","","",""
  • --txt - (optional) Output data as text (.txt) (the default is true).

  • --prepend - (optional) (only for --text) Can be used to specify file name/path - relative to --dir or current working directory - to prepend its content to the generated output.

  • --append - (optional) (only for --text) Can be used to specify file name/path - relative to --dir or current working directory - to append its content to the generated output.

  • --reporting - (optional) Can be used to enable reporting of warnings/notices, the default is false.

  • --forceFresh - (optional) Forces to ignore a cache.

Disclaimer

The generated content may not be completely accurate and/or comprehensive.

License

The software is licensed under MIT No Attribution License (MIT-0), so, you are not obliged to give attribution when using/redistributing software.

In case it's important, MIT No Attributtion License (MIT-0) is OSI-Approved: MIT-0