Socket
Book a DemoInstallSign in
Socket

@salesforce/plugin-command-reference

Package Overview
Dependencies
Maintainers
73
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce/plugin-command-reference

Generate the Salesforce CLI command reference guide

Source
npmnpm
Version
2.0.8
Version published
Weekly downloads
25K
-3.1%
Maintainers
73
Weekly downloads
 
Created
Source

@salesforce/plugin-command-reference

Generate the Salesforce CLI command reference guide.

Version Codecov Downloads/week License

First install the plugin.

$ sfdx plugins:install @salesforce/plugin-command-reference

Ensure any plugins are installed that you with to generate documentation for.

$ sfdx plugins:install salesforcedx@latest-rc

Now we can generate the documentation for the latest-rc tag.

$ sfdx commandreference --plugins salesforcedx

Note: Warnings will occur for missing properties in plugins. Those have to be fixed in the plugin itself.

Add to your Salesforce CLI Plugin

To add this to your plugin to catch warning at development time, add it as a dev plugin in the project.json.

"oclif": {
  "devPlugins": [
    "@salesforce/plugin-command-reference"
  ]
}

Then you can run this in your plugin's CI.

./bin/run commandreference --plugins <name-of-your-plugin> --error-on-warnings

Local Development

If you need to make changes to this repository, the easiest thing to do is to link it to your Salesforce CLI. After you cloned this plugin, run the following from this plugin directory:

sfdx plugins:link .

Now, you can install any plugins you want and run the command reference generation on them.

sfdx plugins:install salesforcedx
sfdx plugins:install config
sfdx plugins:install alias
sfdx plugins:install auth
sfdx commandreference --plugins salesforcedx,alias,config,auth

Commands

sf commandreference:generate

generate the command reference guide located

generate the command reference guide located

USAGE
  $ sf commandreference:generate

OPTIONS
  -d, --outputdir=outputdir            [default: ./tmp/root] output directory to put generated files

  -p, --plugins=plugins                comma separated list of plugin names to be part of the generation. Defaults to
                                       the oclif plugin in the current working directory

  -s, --ditamap-suffix=ditamap-suffix  [default: unified] unique suffix to append to generated ditamap

  --erroronwarnings                    fail the command if there are any warnings

  --hidden                             show hidden commands

  --json                               Format output as json.

See code: src/commands/commandreference/generate.ts

Keywords

sfdx-plugin

FAQs

Package last updated on 15 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts