Git Product home page Git Product logo

node-license-sniffer's Introduction

node-license-sniffer

node-license-sniffer is a tool for detecting the license of node packages. It will attempt to read the license from package.json. If it cannot find the license in package.json, it will read LICENSE and similarly named files and attempt to guess the license in use.

Installation

npm install license-sniffer

Usage

node-license-sniffer [package-dir] [--js-comment] [--recurse] [--body] [--no-generate-body]

Arguments:

  • package-dir -- the directory of the package. Defaults to the current directory.
  • --js-comment -- prepend all output with //. Useful if generating license information for inclusion in JavaScript files.
  • --recurse -- find the license for the specified package, and its dependencies.
  • --body -- include the body of each license where possible.
  • --no-generate-body -- by default, --body generates the body of known licenses if the license body is not included in the package. Use this option to only include license bodies if they're explicitly included in the package.

Examples

Running node-license-sniffer in its own directory:

$ node-license-sniffer
BSD

Using --js-comment and --body (truncated for brevity):

$ node-license-sniffer --js-comment --body
// BSD
// 
//     Copyright (c) 2013, Michael Williamson
//     All rights reserved.
//     
//     Redistribution and use in source and binary forms...

Using package-dir and --recurse:

$ node-license-sniffer node_modules/optimist --recurse
Module: [email protected]
License: MIT/X11

Module: [email protected] => [email protected]
License: MIT/X11

node-license-sniffer's People

Contributors

mwilliamson avatar bahmutov avatar

Watchers

James Cloos avatar Gorden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.