Coder Social home page Coder Social logo

mix3 / autocomplete-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from withfig/autocomplete-tools

0.0 0.0 0.0 4.37 MB

Command line tools for working with Fig autocomplete specs

License: MIT License

Shell 0.05% JavaScript 2.85% Python 2.82% Go 2.57% TypeScript 91.68% Makefile 0.02% Batchfile 0.01%

autocomplete-tools's Introduction

Fig Autocomplete-Tooling Repo

This repo contains the source for all of Fig tools related with autocomplete.

  1. You can see the list of Fig's packages on the NPM registry here: https://www.npmjs.com/~withfig

  2. You can see the source code and related README for each package in the ./packages folder

Packages

To publish a package:

  1. Update the package.json version propery

  2. Commit the updated package.json file to the origin repo

  3. 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/[email protected]
  1. Run yarn workspace <workspace name> npm publish

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.

yarn workspace @withfig/autocomplete-types npm publish

Note: <workspace name> is not the name of the folder, but the name specified inside the package.json of the package to publish.

Conventions for new CLI integration

Package (integration) name

  • 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

Name of the default subcommand added to the CLI

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.

Function that adds the command

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 or createCompletionSpecCommand for functions creating a new subcommand
  • generateCompletionSpec 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 on public-site-nextjs

Docs MUST conform to the rules listed above too.

autocomplete-tools's People

Contributors

fedeci avatar sullivan-sean avatar grant0417 avatar brendanfalk avatar clo4 avatar mschrage avatar slatlasdev avatar developer-guy avatar chaynabors avatar ibayramli avatar spikatrix avatar kidonng avatar raulb avatar hakamadare avatar fwesss avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.