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

concat-licenses

v3.0.1

Published

Concatenates all license files of node modules used in a project into a single text file.

Downloads

1,131

Readme

NPM License Concatenator

Looking to make an electron app and can't be bothered with putting together licenses?

This package searches for licenses in node project dependencies and creates a library license file that can be used for redistributable packages.

This package is based off davglass/license-checker and uses its functionalities for finding licenses.

With the detection of licenses, it follows davglass/license-checker, with the exception that guesses are enabled for explicitly named LICENSE files only. Any other license guesses such as from README are not allowed and will produce a warning. A warning is also given if the file is missing or inaccessable.

Usage

Writing to file

npm install -g concat-licenses
cd /path/to/work/dir
concat-licenses LICENSE.lib.txt

OR

cd /path/to/work/dir
npx concat-licenses LICENSE.lib.txt

Logging to console

npm install -g concat-licenses
cd /path/to/work/dir
concat-licenses

OR

cd /path/to/work/dir
npx concat-licenses

Options

[email protected]
Usage: concat-licenses [/path/to/output] [options]

Options:
  --version                 Displays version information               [boolean]
  --help                    Show help                                  [boolean]
  --ignoreMissing           Ignore packages that are missing licenses (supresses
                            warnings)                                  [boolean]
  --allowGuess              Allow guessed licenses from README and COPYING files
                            (otherwise warns)
  --includeCurrent          Include the license of the main package in the
                            concatenated licence
  --title                   Title to include on the output file.
                           [string] [[default: "LICENSES FOR SOFTWARE PACKAGES"]
  --start                   Set package directory to start from
                                               [string] [default: process.cwd()]
  --production              Only include production dependencies       [boolean]
  --development             Only include development dependencies      [boolean]
  --packages                Only include licenses from semicolon-seperated list
                            of packages                                 [string]
  --excludePackages         Exclude licenses from semicolon-seperated list of
                            packages                                    [string]
  --excludePrivatePackages  Exclude licenses from any package marked as private
                                                                        [string]
  --direct                  Include licenses from direct dependencies only
                                                                       [boolean]

Module Use

The package can be required for use in another node module. One async function is exposed for use. Async functions return a promise, so the .then() syntax can also be used.

const concatLicenses = require("concat-licenses").concat;

(async () => {
  const output = await concatLicenses({
    ignoreMissing: false,
    allowGuess: false,
    includeCurrent: false,
    title: "LICENSES FOR SOFTWARE PACKAGES\n\n",
    start: process.cwd(),
    production: false,
    development: false,
    packages: "",
    excludePackages: "",
    excludePrivatePackages: "",
    direct: false,
  });
})();

The output will be the formatted text string that is usually written to a file.