Debian Codegraph @

README.md

raw symbols SCIP
1 # Fig Autocomplete-Tooling Repo
2
3 This repo contains the source for all of Fig tools related with [autocomplete](https://github.com/withfig/autocomplete).
4
5 1. You can see the list of Fig's packages on the NPM registry here: https://www.npmjs.com/~withfig
6
7 2. You can see the source code and related README for each package in the `./packages` folder
8
9 ## Packages
10
11 - [`create-completion-spec`](cli/create-completion-spec/README.md)
12 - [`@fig/publish-spec`](cli/publih-spec-to-team/README.md)
13 - [`@withfig/autocomplete-tools`](cli/tools-cli/README.md)
14 - [`@fig/eslint-config-autocomplete`](eslint/config-autocomplete/README.md)
15 - [`@withfig/eslint-plugin-fig-linter`](eslint/plugin-fig-linter/README.md)
16 - [`@fig/autocomplete-generators`](generators/README.md)
17 - [`@fig/autocomplete-hooks`](hooks/README.md)
18 - [`@fig/autocomplete-helpers`](helpers/README.md)
19 - [`argparse_complete_fig`](integrations/argparse/README.md)
20 - [`cement_complete_fig`](integrations/cement/README.md)
21 - [`clap_complete_fig`](integrations/clap/README.md)
22 - [`click_complete_fig`](integrations/click/README.md)
23 - [`cobracompletefig`](integrations/cobra/README.md)
24 - [`@fig/complete-commander`](integrations/commander/README.md)
25 - [`@fig/complete-oclif`](integrations/oclif/README.md)
26 - [`swift-argument-parser`](integrations/swift-argument-parser/README.md)
27 - [`@fig/autocomplete-merge`](merge/README.md)
28 - [`@fig/autocomplete-shared`](shared/README.md)
29 - [`@withfig/autocomplete-types`](types/README.md)
30
31 ## To publish a package:
32
33 1) Update the `package.json` `version` propery
34
35 2) Commit the updated `package.json` file to the origin repo
36
37 3) Git tag the commit you have just made using the following format and push the tag to the origin repo
38 - The git tag should be: `<package_name>@<new_numerical_version>`
39 - Example: `git tag @fig/[email protected]`
40
41 4) Run `pnpm publish ./<package>`
42
43 > **IMPORTANT**: remember to tag the new package version following the current conventions (see the previous tags of a package)
44 > this is important for some workflows we are running and to keep track of when releases were done.
45
46 > **IMPORTANT**: all packages need to be git tagged, not only npm ones!
47
48 e.g.
49 ```bash
50 pnpm publish ./types
51 ```
52
53 > Note: `<workspace name>` is not the name of the folder, but the name specified inside the package.json of the package to publish.
54
55 ## Conventions for new CLI integration
56
57 ### Package (integration) name
58
59 - If namespaced it SHOULD be `@fig/complete[-_]($FRAMEWORK_NAME)`
60 - If not namespaced it SHOULD be `($FRAMEWORK_NAME)[-_]complete[-_]fig`
61
62 According to language conventions you can use a dash or an underscore to separate the words.
63
64 Examples:
65 - `@fig/complete-commander`
66 - `@fig/complete-oclif`
67 - `clap_complete_fig`
68 - `cobracompletefig`
69
70 ### Name of the default subcommand added to the CLI
71
72 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.
73 That default name MUST be `generate-fig-spec` such that running `$CLI generate-fig-spec` prints the spec.
74
75 ### Function that adds the command
76
77 The functions exported from the integration can:
78 - Create a new framework subcommand which will print the spec when invoked
79 - Generate a spec and return it
80
81 In all the cases the names are standardized and SHOULD be:
82 - `addCompletionSpecCommand` or `createCompletionSpecCommand` for functions creating a new subcommand
83 - `generateCompletionSpec` for functions that return the spec as a string
84
85 According to language conventions these function names can be transformed to snake case, etc...
86
87 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:
88 - `.figCompletion()`
89
90 ### Docs on `public-site-nextjs`
91
92 Docs MUST conform to the rules listed above too.