Skip to content

v3.2.0

Choose a tag to compare

@cesarParra cesarParra released this 28 Sep 16:17
· 247 commits to master since this release
33dcebe

New features

The changelog subcommand

This new subcommand generates a single Markdown file that lists any changes between 2 versions of your source code.

apexdocs changelog --previousVersionDir old-source-code --currentVersionDir force-app

Run multiple subcommands at the same time

You might want to generate different types of documentation using a single command. For example, if you are releasing a new version of your project, you might want to generate updated documentation Markdown files, and at the same time generate a changelog listing everything new.

You can do this by providing a configuration file that exports a configuration object which keys are the type of documentation you want to generate.

import { defineMarkdownConfig, defineChangelogConfig } from '@cparra/apexdocs';

export default {
  markdown: defineMarkdownConfig({
    sourceDir: 'force-app',
    targetDir: 'docs',
    scope: ['global', 'public'],
    ...
  }),
  changelog: defineChangelogConfig({
    previousVersionDir: 'force-app-previous',
    currentVersionDir: 'force-app',
    targetDir: 'docs',
    scope: ['global', 'public'],
  })
};

Then just run apexdocs without any additional subcommand to generate the documentation.

Exclude files through the config file

It is currently possible to exclude files from being included in the documentation by either using the scope flag or by adding an @ignore tag to the docs.

But there are situations where your source code is actually in scope, and at the same time you don't want to pollute the code with a bunch of @ignore comments for a specific external tool.

To allow for even further configuration around ignoring files, a new exclude property is configurable when using a package.json apexdocs config key, or a standalone config file.

This property allows you to specify a list of glob patterns that define the files you would like to be excluded from processing by the tool altogether.

import { defineMarkdownConfig } from "@cparra/apexdocs";

export default defineMarkdownConfig({
  ...
  exclude: ['**/MyClass.cls', '**/MyOtherClass.cls'],
  ...
});