From bed9cbb1b828a2b8660f3530e63a3b78b609d92c Mon Sep 17 00:00:00 2001 From: marcus Date: Sat, 23 May 2015 01:03:38 +0200 Subject: [PATCH] Updated dependencies, Added version badge, Added usage example --- README.md | 33 ++++++++++++++++++++++++++++++++- package.json | 26 ++++++++++++++++++++------ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 065691e..1ce1142 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ NPM License Crawler =================== +[![npm version](https://badge.fury.io/js/npm-license-crawler.svg)](http://badge.fury.io/js/npm-license-crawler) + NPM License Crawler is a wrapper around [license-checker](https://github.com/davglass/license-checker) to analyze several node packages (package.json files) as part of your software project. This way, it is possible to create a list of third party licenses for your software project in one go. File paths containing ".git" or "node_modules" are ignored @@ -35,6 +37,30 @@ Example ------- npm-license-crawler --exclude ./lib/logging --dependencies --csv licenses.csv + +Using npm-license-crawler programmatically +------------------------------------------ + +See the following example. + + var crawler = require('npm-license-crawler'), + options = { + start: ['../..'], + exclude: ['.'], + json: 'licenses.json', + unknown: true + }; + + crawler.dumpLicenses(options, + function(error, res){ + if (error) { + console.error("Error:", error); + } + else { + console.dir(res); + } + } + ); History ------- @@ -76,8 +102,13 @@ History * 20150414, V0.0.8 * Changed API of dumpLicenses() callback to improve programmatic use - * Sorting and file output are nuw done as part of dumpLicenses() + * Sorting and file output are now done as part of dumpLicenses() +* 20150423, V0.0.9 + * Updated dependencies + * Added version badge + * Added usage example + Todo ---- diff --git a/package.json b/package.json index 1c7be23..e32bea4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "npm-license-crawler", - "version": "0.0.8", + "version": "0.0.9", + "homepage": "https://github.com/mwittig/npm-license-crawler", "description": "Analyzes license information for multiple node.js modules (package.json files) as part of your software project.", "main": "./lib/index.js", "bin": { @@ -8,9 +9,9 @@ }, "dependencies": { "jquery-extend": "~2.0.3", - "async": "^0.9.0", - "nopt": "^3.0.1", - "mkdirp": "^0.5.0", + "async": "^1.0.0", + "nopt": "^3.0.2", + "mkdirp": "^0.5.1", "nopt-usage": "^0.1.0", "nopt-defaults": "^0.0.1", "license-checker": "git+https://github.com/mwittig/license-checker" @@ -22,7 +23,16 @@ "scripts": { "test": "istanbul cover --print both vows --" }, - "author": "Marcus Wittig", + "author": { + "name": "Marcus Wittig", + "url": "https://github.com/mwittig/npm-license-crawler" + }, + "contributors": [ + { + "name": "Marcus Wittig", + "url": "https://github.com/mwittig" + } + ], "bugs": { "url": "http://github.com/mwittig/npm-license-crawler/issues" }, @@ -41,5 +51,9 @@ "npm", "checker", "crawler" - ] + ], + "engines": { + "node": ">0.8.x", + "npm": ">1.1.x" + } } \ No newline at end of file