Socket
Socket
Sign inDemoInstall

@hlustikp/license-exporter

Package Overview
Dependencies
16
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hlustikp/license-exporter

A simple license crawler for crediting open source work


Version published
Weekly downloads
6
decreased by-64.71%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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/[boolean]N/A
-p, --prettyPrettify the json output.flag/[boolean]N/A
-m, --markdownExports the license information into ./licenses.md as markdown.flag/[boolean]N/A
-r, --recursiveInclude all of the dependencies' sub-dependencies.flag/[boolean]N/A
--prod, --productionCrawl production dependencies (dependencies section in package.json).flag/[boolean]true
-d, --devCrawl dev dependencies (devDependencies section in package.json).flag/[boolean]false
--opt, --optionalCrawl optional dependencies (optionalDependencies section in package.json).flag/[boolean]false
-o, --outputOutput folder for the exports.[string]Current folder
-i, --inputPath to the input folder containing your package.json and node_modules[string]Current folder
-h, --helpShow helpflag/[boolean]N/A
-v, --versionShow version numberflag/[boolean]N/A

Keywords

FAQs

Last updated on 23 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc