Command Line - Contribution

Skyflow is an open source project. Anyone can contribute. To explain how to contribute, we will take the example of the hello command.

1 - Fork project

The first step is to get the project from Github.

2 - Install dependences

Go to the root of the project with cd command and use npm install to install the dependencies.

3 - Let's create our class

A command is defined by a class. So by creating the class in src/Command directory, our command will be created. Class structure should look like the code below

When the class is loaded, the application container is injected in the constructor.

4 - Run our command

Let’s add something to our command

To run our command, use node index.js add

5 - Documentation

Each command must be documented. Let’s use the annotations to document our class.

Tags description

  • @class (required) : Class name
  • @module (required) : Module name. Default value is Command
  • @author (optional) : Command author.
  • @command (required) : Command name.
  • @arguments (optional) : Command arguments.
  • @see (optional) : External link for more details.
  • @options (optional) : Command options.
  • @examples (optional) : Examples that illustrate the use of the command.
  • @related (optional) : Commands that are related to this command.
  • @since (required) : The version of implementation.

6 - Commit message guidelines

Commit message must be formatted. We follow Angular Commit Message Guidelines