The cause of

Ah, the path, you have a problem is this save ah, if less preach what parameters, then, I open a browser, after filling in the data, click save, then go to the network interface in the TAB to view the request parameters passed, don’t see well, see, well, such a long string, among a pile of escape character, Basically, it’s a nested JSON string that looks something like this

Even if there is too much data to display, you have to click the “Show more” button at the end of the line. In this way, after selecting and copying all the data, you can put it into a JSON parsing and formatting website like www.json.cn/#, and the result is like this again

What, this wave is injured, have 🤕, so I just come up an idea, I want to write a book, I’m sorry, go the wrong set of 😝, actually here, we also have guessed, I want to write a similar to the json formatted website, but to write web site to the server, with no earn first bucket of gold front-end er, not reality, So I came up with the idea of writing a vscode plug-in. As a front-end, it is impossible to know vscode, and the most important thing is that vscode itself is written in js, so his plug-in must also be inseparable from js…

after

To start, first of all, the baidu each tutorial, find the most detailed is a direct translation of documents the club’s official website, seems to involve is limited, not line, can not stand, and direct download the netease youdao dictionary, began to chew the foreign website directly, only to find that very process, in fact before the general process and upload a NPM package, They register their website and get an account first, then create a project, then obtain the corresponding token of the user, and then log in and publish using the command line. The specific process is roughly as follows

  1. Register a Microsoft account, if you do not have an account, you can directly register a Microsoft account
  2. Open dev.azure.com and log in using your Microsoft account
  3. Click on the upper right corner to obtain your personal token, and create a new one if you don’t have one. Basically choose the default one, and you’d better select all the permissions. Then remember to save the token and name

  1. So let’s go to the command line

Globally registered plug-ins generate scaffolding

npm install -g yo generator-code

Initialize the plug-in project

yo code

Once the project is built, close vscode, re-open vscode in the project directory, and press f5 to debug the code happily

  1. Finally, release, involving VSCE

Install VSCE globally

npm install -g vsce

Log in with the saved name and enter the saved token

vsce login username

release

vsce publish

The results of

Once the plug-in is released, that’s about it

If you want to see the implementation, you can go to github, github.com/Guanrui1/cl… 😋