Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

How to create new Command for this extension ?

hitesh saini edited this page Apr 3, 2021 · 1 revision

To create a new voice command -

cd project_dir
yarn generate:command

This will ask you couple of question to set up your command which are as follows:

  1. Command file name : Type any valid variable name(as your filename).

  2. Command name/names: type command name(s). upon these names, your command callback function will be called.

  3. Is this command available to all the languages: YES | No - if you select yes than your command name(s) will automatically be translated and saved in the translation files.

  4. Should this command be enabled by default? Yes | No - if you want to enable command by default.

  5. Type description of the command: Description of the command so that user could understand what command would do.

  6. Select type of the command?: backend | frontend - if you want to utilize dom then select frontend or if you want to utilize chrome extension apis then select backend.

After the confirmation, your command will be created in the src/services/commands/ directory.