adapt-authoring-docs 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/docgen.js CHANGED
@@ -105,7 +105,7 @@ async function docs () {
105
105
 
106
106
  try {
107
107
  await fs.rm(outputdir, { recursive: true, force: true })
108
- await fs.mkdir(outputdir)
108
+ await fs.mkdir(outputdir, { recursive: true })
109
109
  await copyRootFiles()
110
110
  await jsdoc3(appData, cachedConfigs, outputdir, defaultPages)
111
111
  await docsify(appData, cachedConfigs, outputdir, defaultPages)
package/bin/docserve.js CHANGED
@@ -17,7 +17,7 @@ async function getOutputDir () {
17
17
  const { loadDependencies, loadConfigDefaults } = await import('../lib/docsData.js')
18
18
  const rootDir = path.resolve(getArg('--rootDir') || process.cwd())
19
19
  const dependencies = await loadDependencies(rootDir)
20
- const config = await loadConfigDefaults(dependencies)
20
+ const config = await loadConfigDefaults(rootDir, dependencies)
21
21
  return path.resolve(config.get('adapt-authoring-docs.outputDir'))
22
22
  }
23
23
 
@@ -56,8 +56,9 @@ export default async function docsify (appData, configs, outputdir, defaultPages
56
56
  if (!sectionsConf[key]) sectionsConf[key] = data
57
57
  })
58
58
  }
59
- [...customFiles, ...globSync('docs/*.md', { cwd: c.rootDir, absolute: true })].forEach(f => {
60
- if (f === defaultPages.sourceIndex) {
59
+ const excludedFiles = ['README.md', ...Object.values(defaultPages).filter(Boolean).map(f => path.basename(f))]
60
+ ;[...customFiles, ...globSync('docs/*.md', { cwd: c.rootDir, absolute: true })].forEach(f => {
61
+ if (excludedFiles.includes(path.basename(f))) {
61
62
  return
62
63
  }
63
64
  const title = path.basename(f)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-docs",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Tools for auto-generating documentation for the Adapt authoring tool",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-docs",
6
6
  "license": "GPL-3.0",