Gathering detailed insights and metrics for html-license-gen
Gathering detailed insights and metrics for html-license-gen
Gathering detailed insights and metrics for html-license-gen
Gathering detailed insights and metrics for html-license-gen
npm install html-license-gen
Typescript
Module System
Node Version
NPM Version
60.2
Supply Chain
96.4
Quality
70.1
Maintenance
50
Vulnerability
85.6
License
TypeScript (92.06%)
HTML (5.16%)
Shell (1.57%)
JavaScript (1.22%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
7 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Nov 13, 2023
Latest Version
1.1.1
Package Id
html-license-gen@1.1.1
Unpacked Size
1.04 MB
Size
189.54 kB
File Count
77
NPM Version
9.8.1
Node Version
18.18.2
Published on
Nov 14, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
10
Generate a HTML page with list of dependency licenses based on npm/yarn installed packages. Example output
This project is based on npm-license-generator
Install:
1npm install --global html-license-gen
Options:
1$ html-license-gen --help 2 3Usage: 4 html-license-gen [folder] 5 6Positionals: 7 folder Folder of NPM project. Defaults to current working directory [string] 8 9Paths and files: 10 --folder Folder of NPM project. Defaults to current working 11 directory [string] 12 --monorepo-root Root folder of monorepo - if project is in monorepo[string] 13 --out-path HTML output path [string] [default: "./licenses.html"] 14 --tmp-folder-name Name of temporary folder 15 [string] [default: ".license-gen-tmp"] 16 17Output HTML appearance: 18 --group Group licenses [boolean] [default: true] 19 --external-links Link package names to their repos [boolean] [default: true] 20 --add-index Creates index with link to licenses below 21 [boolean] [default: false] 22 --title Use given value as document title [string] [default: false] 23 --template Path to custom mustache template [string] 24 25Package related: 26 --registry URL of package registry to use 27 [string] [default: "https://registry.npmjs.org"] 28 --ignored Semicolon-separated list of packages to ignore 29 [string] [default: "html-license-gen"] 30 --only-prod Ignore optional and dev dependencies[boolean] [default: false] 31 --package-lock Run on all packages listed in package-lock.json 32 [boolean] [default: false] 33 34Cache and optimization: 35 --keep-cache Do not clean cache after run [boolean] [default: false] 36 --checksum-path Checksum file path, to detect if update of HTML is needed 37 [string] [default: false] 38 --checksum-embed Embed checksum into HTML to detect need for update 39 [boolean] [default: false] 40 --avoid-registry Try local package.json instead asking online registry 41 [boolean] [default: true] 42 --no-spdx Do not download license file based on SPDX string 43 [boolean] [default: false] 44 --only-spdx Do not use tarballs, only use SPDX string 45 [boolean] [default: false] 46 --only-local-tar Do not download tarballs, use only local tarballs 47 [boolean] [default: true] 48 49Options: 50 --version Show version number [boolean] 51 --help Show help [boolean] 52 --log-level Configures how verbose logs are, one of the following values: 53 error, warn, info, verbose, debug [string] [default: "warn"] 54 --error-missing Exit 1 if no license is present for a package 55 [boolean] [default: false]
All boolean options can be prepended with no-
that negates flag,
for example; --group
groups packages but --no-group
disables grouping.
--error-missing
, --no-error-missing
If enabled, stops and exits generator (without generating/updating HTML file) when any expected license is missing
Disabled by default.
--log-level
Decides how detailed log are. Allowed levels: error
, warn
, info
, verbose
, debug
warn
by default
--folder
Specify root directory of project to parse, by default current directory
--monorepo-root
Specify root directory of monorepo in case it is workspace based project, used to search for package, lock and license files.
--out-path
Specify output path where generated file will be written.
File is always overwritten unless --checksum-path
or --checksum-embed
is used and no change is needed.
--tmp-folder-name
Specify folder where to download tarballs. Folder need to be writable.
Folder and its contents gets deleted after generating file unless --keep-cache
options is given.
--group
, --no-group
Groups packages which use exact same license texts, reducing duplicates and file size.
Enabled by default.
--external-links
, --no-external-links
Links package names (in license header) to their homepages (if and as configured in package.json homepage
)
Enabled by default.
--add-index
, --no-add-index
Creates index at begin of file - list of anchors allowing quickly jumping to respective package library.
Disabled by default.
--title
Overrides default document title / main header (which is root app package name) with given string.
--template
Overrides default template path, allowing passing custom template.
--registry
Allows specifying URL of custom NPM repository, otherwise default global NPM repo is used
--ignored
Semicolon-separated list of packages to ignore and NOT include in generated HTML.
For example: typescript;eslint;tar
--only-prod
, --no-only-prod
If enabled, ignores optional and development packages, using only "production" facing packages
Disabled by default.
--package-lock
, --no-package-lock
Instead of relying solely on package.json
- also scan lock files to include all dependencies and sub-dependencies.
Generates bigger file but include also dependencies of dependencies, not only direct deps.
Recommended to use with --only-prod
(which would otherwise be huge) and without --no-avoid-registry
which generates a lot of network requests to registry
Disabled by default.
--keep-cache
, --no-keep-cache
If enabled, does not delete tmp folder, allowing cache to persist between runs
Disabled by default.
--checksum-path
Allows skipping generation of HTM when packages have not changed.
If path is specified, special file indicated by path is used to store checksum.
If file exist and contains checksum matching checksum resolved for current package/version list - HTML generation will be skipped
After generating HTML file, checksum is written/updated int this file.
NOTICE - it does NOT checks for changes in license files, only if package list (and their version) are same.
--checksum-embed
, --no-checksum-embed
Allows skipping generation of HTM when packages have not changed.
If specified, embed checksum inside generated HTML (as an comment)
If existing HTML checksum matching checksum resolved for current package/version list - HTML generation will be skipped
NOTICE - it does NOT checks for changes in license files, only if package list (and their version) are same.
Disabled by default.
--avoid-registry
, --no-avoid-registry
By default, instead asking online NPM repo, uses package.json
files found in node_modules
.
It is way faster but may be inaccurate.
Enabled by default.
--no-spdx
If enabled, does not use SPDX license repository as fallback for missing licenses
Disabled by default.
--no-spdx
If enabled, use only SPDX license repository and do not use license files found in packages/tarballs
Disabled by default.
--only-local-tar
, --no-only-local-tar
By default, use only local filesystem and tarballs for license discovery.
--no-only-local-tar
will enable downloading tarballs from resolved online URLs - but this may generate lot of internet traffic, especially when used together with --package-lock
or without --only-prod
Enabled by default.
Supply your own template using the --template
option. Templates are written in Mustache. Your template does not have to be HTML, change the output file name using --out-path
.
Use template.html
file as and starting point
No vulnerabilities found.
No security vulnerabilities found.