当前位置:网站首页>Cloudide plug-in in in hand, get off work on time

Cloudide plug-in in in hand, get off work on time

2020-12-07 15:21:51 Huawei cloud developer community

Abstract : Take you through the plug-in mechanism to CloudIDE Expand the functionality you want , stay CloudIDE China Watch Video , Play a game , Chat can be easily implemented through our plug-ins , Make production tools no longer boring , The development work is colorful .

Distance from Huawei cloud CloudIDE stay 3 month HDC More than half a year has passed since the launch , The integrated development environment running on the web brings a new development experience , As a developer , stay CloudIDE Do you want to add different functions to your working environment after working for a period of time ? The next tutorial will take you through the plug-in mechanism to CloudIDE Expand the functionality you want , stay CloudIDE China Watch Video , Play a game , Chat can be easily implemented through our plug-ins , Make production tools no longer boring , The development work is colorful .

If you have a good idea, you can turn it into a plug-in and share it with the plug-in market , Let other developers experience it together , Help you improve , Now let's go into CloudIDE Plug in development in the actual combat to .

One . Create the first one CloudIDE plug-in unit

Hua Wei Yun CloudIDE Plug in development can be completely in CloudIDE on , No need to install any software locally , So the first step we can apply for is CloudIDE Instance as our development environment (_ Readers who don't want to read the text can directly refer to the animation to create the environment _).

adopt https://ide.huaweicloud.com Into the ..., Click on " Experience now " Access control , As an example of the development environment, we need to permanently save our plug-in code and development environment configuration , Click on " New instance " To create a permanent instance .

Because plug-in development needs to use Node.JS, So our technology stack can choose "All in One" perhaps "Node.JS", Click next ,

In the project configuration, we choose not to create a project ,CloudIDE Currently supported in IDE Create project in instance , There is no need to import the code by importing the sample project . Click OK to complete one CloudIDE Instance creation , After successful creation, it will automatically start and enter the instance .

After entering the instance, we can start to create the plug-in project , It is divided into the following steps :

  • 1) Click on File->New Project, The new project page will pop up .
  • 2) choice Plugin Project type to create a plug-in project .
  • 3) Fill in the plug-in information , Here, explain the meaning and function of each option one by one

Type: Select the type of plug-in you want to create .

⇨ Generic: General plug-in project with front and back end , The front end can support html Or templates to write , It is suitable for plug-ins that need highly customized interface ;

⇨ Backend: The front end does not have the item itself , Need to use CloudIDE Existing interface extension points to implement the front end .

Path: Select the path where the plug-in project needs to be stored .

Name: The name of the plug-in , The directory of the plug-in project has the same name .

Publisher: Plug in publisher , Huawei cloud account name is automatically obtained by default .

Author: Plugin author , Huawei cloud account name is automatically obtained by default .

License: Select the source code of the plug-in project License, Options are supported by default MIT and BSD, Can be generated automatically LICENSE Statement , If you customize other LICENSE You need to add your own statement .

Version: The first version number of the plug-in , It is recommended to use 0.0.1 This version format .

Description: Detailed description of the plug-in .

Engine: Rendering html The template engine you need to use .

Git-Init: Whether to initialize the new project to a git Warehouse .

  • 4) Click on “Create” New plug-in project .

Two . Plug in package installation

Plug in projects can be executed by npm run pack package , There are currently two ways to execute the command

Mode one :

  1. Right click on the Explorer Of NPM SCRIPTS Medium pack command .
  2. choice run, Perform packaging
  3. After running, you can see that the root directory of the project appears packaged with '.cloudide' Install the package for the final plug-in

Mode two :

  1. Click on Termianl->New Terminal Create a new one termianl
  2. Enter... On the command line 'npm run pack', Perform packaging
  3. After running, you can see that the root directory of the project appears packaged with '.cloudide' Install the package for the final plug-in

3、 ... and . Test the plug-in effect

The packaged plug-in installation package can be installed directly through the right-click menu , Right click on the package '.cloudide' Plug-in package , choice 'Install Plugin', After the plug-in is installed, it will be activated automatically .

This article is shared from Huawei cloud community 《 actual combat CloudIDE Plug-in development - Quick start 》, Original author : Claude loves first .

Click to follow , The first time to learn about Huawei's new cloud technology ~

版权声明
本文为[Huawei cloud developer community]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201207152125683j.html