Environment Setup
To build extension CLI locally you will need Node.js and any web IDE of your choice.
Developing the CLI requires two projects open at the same time:
- the CLI source code, which you are developing
 - a driver project that is used to execute the CLI commands
 
The following instructions explain how to set up this environment.
Instructions
1. Setup the CLI
- 
Clone the forked repo and then open it in your favorite web IDE
 - 
Run the following command in terminal:
 
1 |  | 
2. Setup driver project
Next you will need a project to drive the CLI to be able to execute its commands. You can use any existing extension project that is using extension-cli.
If you do not have an existing project, create a new project. In the directory where you want to create the driver project run:
1 |  | 
then follow the on-screen instructions. Once you have the project ready, open it in a web IDE. At this point you should have two IDE windows open.
3. Link driver and CLI
- 
In CLI project terminal run this command (use
sudo npm linkif necessary):1npm link - 
In the driver project terminal run this command:
1npm link extension-cli 
Clean up
Unlink CLI and driver project to remove all local links.
In the driver project terminal run:
1 |  | 
to unlink project from the local CLI version. Note that this may remove
extension-cli from the project completely, and you may need to run install extension-cli
to add back the version from NPM registry. This is relevant only if you used
an existing project as a driver.
In CLI project terminal run:
1 |  | 
to remove the CLI symlink.