feat(extend-lion-docs): release + forward settings from rocket preset

This commit is contained in:
Thomas Allmer 2021-06-15 18:09:54 +02:00 committed by Thomas Allmer
parent 269ad57fdd
commit 835c2804a9
4 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'rocket-preset-extend-lion-docs': patch
---
Handle exports that do not have a Lion prefix

View file

@ -0,0 +1,5 @@
---
'rocket-preset-extend-lion-docs': patch
---
Add option `exportsMapJsonFileName` to configure the json filename containing the export map (default to `package.json`)

View file

@ -0,0 +1,5 @@
---
'rocket-preset-extend-lion-docs': patch
---
Support usage without a subfolder for the npm scope (via setting `npmScope: ''`)

View file

@ -14,26 +14,33 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
* @param {object} opts
* @param {string} [opts.rootDir]
* @param {string} [opts.nodeModulesDir]
* @param {string} [opts.npmScope]
* @param {string} opts.classPrefix
* @param {string} opts.classBareImport
* @param {string} opts.tagPrefix
* @param {string} opts.tagBareImport
* @param {string} opts.tagBareImport
* @param {string} [opts.exportsMapJsonFileName]
* @returns
*/
export async function extendLionDocs({
rootDir,
nodeModulesDir,
npmScope,
classPrefix,
classBareImport,
tagPrefix,
tagBareImport,
exportsMapJsonFileName,
}) {
const changes = await generateExtendDocsConfig({
nodeModulesDir,
npmScope,
classPrefix,
classBareImport,
tagPrefix,
tagBareImport,
exportsMapJsonFileName,
});
const extendDocsConfig = {
changes,