# @oxygenxml/js-license-aggregator

> Generates an XML descriptor for third party licenses

Latest version **1.0.11** (published 2020-06-23) · 0 weekly downloads

## Install

```sh
npm install @oxygenxml/js-license-aggregator
pnpm add @oxygenxml/js-license-aggregator
yarn add @oxygenxml/js-license-aggregator
bun add @oxygenxml/js-license-aggregator
```

Provides the command `aggregate-licenses`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2020-06-23 |
| First published | 2018-03-31 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Syncro Soft SRL |
| Maintainers | andreip1123, ctalau, oxygenxml-support |

## Links

- npm: https://www.npmjs.com/package/@oxygenxml/js-license-aggregator
- npm.io page: https://npm.io/package/@oxygenxml/js-license-aggregator

## Dependencies (3)

- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [xmlbuilder](https://npm.io/package/xmlbuilder.md) ^9.0.7
- [license-checker](https://npm.io/package/license-checker.md) ^18.0.0

## Recent versions

- 1.0.11 (latest) — 2020-06-23
- 1.0.10 — 2020-06-23
- 1.0.9 — 2020-02-11
- 1.0.8 — 2018-10-29
- 1.0.7 — 2018-04-04
- 1.0.6 — 2018-04-03
- 1.0.5 — 2018-04-02
- 1.0.4 — 2018-04-02
- 1.0.3 — 2018-04-02
- 1.0.2 — 2018-04-02
- 1.0.1 — 2018-03-31
- 1.0.0 — 2018-03-31

## README

JS License Aggregator
=====================

Generates an XML file describing thrid-party components of the NPM dependencies.

Install
-------

```
yarn add --dev @oxygenxml/js-license-aggregator
```

Usage
-----

You can use it as an `async` function in a Gulp build.

```
let {genThirdPartyComponentsXml} = require('@oxygenxml/js-license-aggregator')

await genThirdPartyComponentsXml({
  path: '.'
})

// or you can use it with browserify if the bundle is generated with full paths

await genThirdPartyComponentsXml({
  browserifyBundles: ['build/app.js', 'build/polyfills.js']
})

```

Or just add it as a postinstall script in the `package.json file:

```
"scripts": {
  "postinstall": "aggregate-licenses"
}

```

How it works
------------

The plugin generates a third-party-components.xml file by following these steps:
1. Determine the components used in the package.json
2. For each component, copy the definition in the existing thrid-party-components.xml if one exists
3. For each new component, creates a draft definition (marked with the 'draft' attribute)

You should manually check the draft definitions and remove the draft attribute once you filled in the details.

---
_Source: https://npm.io/package/@oxygenxml/js-license-aggregator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
