0.2.3 • Published 8 months ago

@hlustikp/license-exporter v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

License Exporter

This project is a fork of the original ODIT.Services - License Exporter created with the intention of expanding it with additional features that were missing in the original. While the core functionality remains the same, this fork aims to enhance the project by addressing specific needs and requirements such as selection which kind of dependencies are to be included (production, dev, etc.).

A simple license exporter that crawls your package.json and provides you with information about your dependencies' licenses. You can export this information into json(even prettyfied) and markdown.

Install

Via your favorite package manager (npm, yarn, pnpm, whatever):

pnpm i -g @hlustikp/license-exporter

Or as a local dev dependency:

pnpm i -D @hlustikp/license-exporter

Build

The project is written in typescript and bun was used to build it. To build the project, run:

bun build ./src/index.ts --outdir ./bin --target node --external yargs
mv ./bin/index.js ./bin/exporter.mjs

CLI Usage

Export only your direct dependencies to json: license-exporter --json

Export all dependencies to json: license-exporter --json --recursive

Export only your direct dependencies to markdown: license-exporter -m

Export all dependencies to markdown: license-exporter -m --recursive

Note: Use npx license-exporter if you install it as a local dev dependency.

Options

ArgDescriptionTypeDefault
-j, --jsonExports the license information into ./licenses.json as json.flag/booleanN/A
-p, --prettyPrettify the json output.flag/booleanN/A
-m, --markdownExports the license information into ./licenses.md as markdown.flag/booleanN/A
-r, --recursiveInclude all of the dependencies' sub-dependencies.flag/booleanN/A
--prod, --productionCrawl production dependencies (dependencies section in package.json).flag/booleantrue
-d, --devCrawl dev dependencies (devDependencies section in package.json).flag/booleanfalse
--opt, --optionalCrawl optional dependencies (optionalDependencies section in package.json).flag/booleanfalse
-o, --outputOutput folder for the exports.stringCurrent folder
-i, --inputPath to the input folder containing your package.json and node_modulesstringCurrent folder
-h, --helpShow helpflag/booleanN/A
-v, --versionShow version numberflag/booleanN/A
0.2.3

8 months ago

0.2.2

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.0

8 months ago