diff --git a/404.html b/404.html index 7fe6d0ba4..cb4239911 100644 --- a/404.html +++ b/404.html @@ -13,7 +13,7 @@ - +
diff --git a/assets/js/d2cad9cb.4e5ba67a.js b/assets/js/d2cad9cb.4e5ba67a.js new file mode 100644 index 000000000..a78d92f3d --- /dev/null +++ b/assets/js/d2cad9cb.4e5ba67a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_rnx_kit_docsite=self.webpackChunk_rnx_kit_docsite||[]).push([[3626],{5654:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var i=n(5893),r=n(1151);const o={},a="third-party-notices",s={id:"tools/third-party-notices",title:"third-party-notices",description:"@rnx-kit/third-party-notices provides a helper library to create a",source:"@site/docs/tools/third-party-notices.md",sourceDirName:"tools",slug:"/tools/third-party-notices",permalink:"/rnx-kit/docs/tools/third-party-notices",draft:!1,unlisted:!1,editUrl:"https://github.com/microsoft/rnx-kit/tree/main/docsite/docs/tools/third-party-notices.md",tags:[],version:"current",frontMatter:{},sidebar:"toolsSidebar",previous:{title:"react-native-lazy-index",permalink:"/rnx-kit/docs/tools/react-native-lazy-index"},next:{title:"tools-android",permalink:"/rnx-kit/docs/tools/tools-android"}},l={},c=[{value:"Usage",id:"usage",level:2},{value:"Commandline",id:"commandline",level:3},{value:"As a library",id:"as-a-library",level:3},{value:"As a plugin",id:"as-a-plugin",level:3}];function d(e){const t={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"third-party-notices",children:"third-party-notices"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"@rnx-kit/third-party-notices"})," provides a helper library to create a\nthird-party-notices text file based on a output bundle. It also provides a cli\ninterface to the library for integration into build steps like just-scripts"]}),"\n",(0,i.jsxs)(t.p,{children:["This function will read the sourcemap file and tries to find all files that are\nreferenced in the sourcemap by assuming that all dependencies are represented as\n",(0,i.jsx)(t.code,{children:"node_modules\\moduleName"})," or ",(0,i.jsx)(t.code,{children:"node_modules\\@scope\\moduleName"})," It will then look\nin the package.json file to see if it finds a licence claration or it will look\nfor the file called ",(0,i.jsx)(t.code,{children:"LICENCE"})," in the root. And aggregate all ese files in the\noutput file."]}),"\n",(0,i.jsx)(t.p,{children:"This package works for npm, yarn and pnpm package layouts formats."}),"\n",(0,i.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsx)(t.h3,{id:"commandline",children:"Commandline"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"npx @rnx-kit/third-party-notices \\\n --rootPathLICENCE
in the root. And aggregate all ese files in the
output file.
This package works for npm, yarn and pnpm package layouts formats.
-At the moment this package only supports webpack based bundles, there is nothing -preventing adding metro support, the current customers of this module are -basedon webpack at the moment.
npx @rnx-kit/third-party-notices \
--rootPath <myPackage> \
--sourceMapFile <myPackage/dist/myPackage.js.map>
Options:
--help Show help [boolean]
--version Show version number [boolean]
--rootPath The root of the repo where to start resolving modules from.
[string] [required]
--sourceMapFile The sourceMap file to generate licence contents for.
[string] [required]
--outputFile The output file to write the licence file to. [string]
--json Output license information as a JSON
[boolean] [default: false]
--ignoreScopes Npm scopes to ignore and not emit licence information for
[array]
--ignoreModules Modules (js packages) to not emit licence information for
[array]
--preambleText A list of lines to prepend at the start of the generated
licence file. [array]
--additionalText A list of lines to append at the end of the generated
licence file. [array]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--rootPath The root of the repo where to start resolving modules from.
[string] [required]
--sourceMapFile The sourceMap file to generate license contents for.
[string] [required]
--json Output license information as a JSON
[boolean] [default: false]
--outputFile The output file to write the license file to. [string]
--ignoreScopes Npm scopes to ignore and not emit license information for
[array]
--ignoreModules Modules (js packages) to not emit license information for
[array]
--preambleText A list of lines to prepend at the start of the generated
license file. [array]
--additionalText A list of lines to append at the end of the generated
license file. [array]
--fullLicenseText Include full license text in the JSON output
[boolean] [default: false]
import { writeThirdPartyNotices } from "@rnx-kit/third-party-notices";
writeThirdPartyNotices({
rootPath: ".",
sourceMapFile: "./dist/myPackage.js.map",
});