This repo contains the source for all of Fig tools related with autocomplete.
-
You can see the list of Fig's packages on the NPM registry here: https://www.npmjs.com/~withfig
-
You can see the source code and related README for each package in the
./packages
folder
create-completion-spec
@fig/publish-spec
@withfig/autocomplete-tools
@fig/eslint-config-autocomplete
@withfig/eslint-plugin-fig-linter
@fig/autocomplete-generators
@fig/autocomplete-hooks
@fig/autocomplete-helpers
argparse_complete_fig
cement_complete_fig
clap_complete_fig
click_complete_fig
cobracompletefig
@fig/complete-commander
@fig/complete-oclif
swift-argument-parser
@fig/autocomplete-merge
@fig/autocomplete-shared
@withfig/autocomplete-types
-
Update the
package.json
version
propery -
Commit the updated
package.json
file to the origin repo -
Git tag the commit you have just made using the following format and push the tag to the origin repo
- The git tag should be:
<package_name>@<new_numerical_version>
- Example:
git tag @fig/publish-spec@1.2.3
- Run
pnpm publish ./<package>
IMPORTANT: remember to tag the new package version following the current conventions (see the previous tags of a package) this is important for some workflows we are running and to keep track of when releases were done.
IMPORTANT: all packages need to be git tagged, not only npm ones!
e.g.
pnpm publish ./types
Note:
<workspace name>
is not the name of the folder, but the name specified inside the package.json of the package to publish.
- If namespaced it SHOULD be
@fig/complete[-_]($FRAMEWORK_NAME)
- If not namespaced it SHOULD be
($FRAMEWORK_NAME)[-_]complete[-_]fig
According to language conventions you can use a dash or an underscore to separate the words.
Examples:
@fig/complete-commander
@fig/complete-oclif
clap_complete_fig
cobracompletefig
Most of our CLI integration tools allow to set the name of the subcommand added to the CLI but we also provide a default value for that.
That default name MUST be generate-fig-spec
such that running $CLI generate-fig-spec
prints the spec.
The functions exported from the integration can:
- Create a new framework subcommand which will print the spec when invoked
- Generate a spec and return it
In all the cases the names are standardized and SHOULD be:
addCompletionSpecCommand
orcreateCompletionSpecCommand
for functions creating a new subcommandgenerateCompletionSpec
for functions that return the spec as a string
According to language conventions these function names can be transformed to snake case, etc...
If the CLI tool integration gets added directly to the module of the CLI tool itself and the CLI tool is configured using chained methods (e.g. yargs), then the chain method name SHOULD be:
.figCompletion()
Docs MUST conform to the rules listed above too.