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

license-extractor

v1.0.4

Published

Recursively walk your project and get a copy of all sub-project license files. This is great for cases where Legal asks you for a list of all the licenses you are using in your project.

Downloads

927

Readme

license-extractor

Purpose

Sometimes the Legal Department gets cranky about open source and demands to read all the liceneses before you ship a product. As anyone who works with open source code knows, it can kind of be a pain in the ass to get all these license files together. Enter License-Extractor (swooooooosh!)

License-Extractor is a tool for extracting and recording all of the license files in your project. Licenese can be output to stdout, a specific file, or to a directory (one file per licenese). You can then turn them over to Legal and let them deal with it.

Installation

npm install licesne-extractor

Usage

License-extractor can be used in one of three different modes:

  • output: Output mode reads in each licenese and outputs the contents and some header info to the stdout device. You can then pipe it wherever pleases you.

  • merge: Merge mode reads in each license and outputs the contents and some header info to the --target file.

  • collect: Collect mode copies each license to the --target directory giving it a more meaningful name, but keeping the contents unaltered.

If no mode is passed in on the command line, output mode is assumed.

Output Mode Usage

Output mode reads in each licenese and outputs the contents and some header info to the stdout device. You can then pipe it wherever pleases you.

licext [--mode output] [--source [dir]] [--noheaders]

--mode tells license-extractor the mode to use, in this case output. --mode is optional when doing output mode.

--source indicates the source directory of the project. If no source is provided . is assumed.

--noheaders turns off the header information output before each license file.

Merge Mode Usage

Merge mode reads in each license and outputs the contents and some header info to the --target file.

licext --mode merge [--source [dir]] [--target [file]] [--noheaders] [--overwrite]

--mode tells license-extractor the mode to use, in this case merge. In order to use merge mode you must include the --mode merge argument.

--source indicates the source directory of the project. If no source is provided . is assumed.

--target is the target file to write all the output to. If the file exists, an error will be generated unless --overwrite is included.

--noheaders turns off the header information output before each license file.

--overwrite will cause any prior existing --target to be removed prior to the --target file being written.

Collect Mode Usage

Collect mode copies each license to the --target directory giving it a more meaningful name, but keeping the contents unaltered.

licext --mode collect [--source [dir]] [--target [dir]] [--overwrite]

--mode tells license-extractor the mode to use, in this case collect. In order to use collect mode you must include the --mode collect argument.

--source indicates the source directory of the project. If no source is provided . is assumed.

--target is the target directory into which all the licenses files will be copied. If the directory exists, an error will be generated unless --overwrite is included.

--overwrite will cause any prior existing --target to be removed prior to the --target directory being written.

Feedback

Feedback on this tool is always welcome and bugs submitted via github will always be answered.

Thanks for using license-extractor.