An extension to edit and view DroidScript Docs.
alt+d
- Show & Select Command Listctrl+alt+d
- Generate Docsctrl+alt+f
- Generate single filealt+u
- Upload all Docs to DroidScriptctrl+alt+u
- Upload single file to DroidScript
- Login to your GitHub account and fork the DroidScript Docs repository on Github.
- Clone the forked repository in your local machine for you to edit the Docs locally using VS Code.
- After cloning, open Docs in VS Code and this extension will automatically detect the folder as DroidScript Docs and append the Generate Docs button in the status bar of VS Code.
DroidScript Docs has its own custom data types which you can see in the js markup files. Though it supports the common data types e.g. String
, Number
, Boolean
, Object
, Function
, Array
, etc., the custom docs data types has an addition description in it.
Examples:
Data Type | Description |
---|---|
num_frc |
Number: fraction (0..1) |
str_col |
String: hexadecimal: “#rrggbb” , “#aarrggbb” colourName: “red” , “green” , ... |
str_com |
String: comma “,” separated: |
Memorizing these custom data types is not practical so the extension offers word suggestions for them with their description. See image below.
- Use the
ctrl+alt+d
shortcut, or click theGenerate Docs
button item in the status bar and select the"Generate"
option in the commands dropdown and select"Open Docs Preview"
menu in the dropdown context menus.
You can simply use the ctrl+alt+f
shortcut, or Right-Click on any markup (".js"
) file and markdown (".md"
) file within the scopes in the "markup/<LANG>"
folder.
You can also Right-Click on the editor tab name.
After the generation, the rendered docs will be opened in a new live-server panel on the right. If there is no live preview being shown, click the Generate Docs
button item in the status bar and select "Open Preview"
command in the commands dropdown.
You can also update the Docs in DS directly, by either using the ctrl+alt+u
shortcut on your editing file, or alt+u
to upload all of them at once (according to your currently used filter settings).
You can also upload all docs from All Commands
in the status bar menu.
Note: To upload your files to DroidScript you need to start the DS WiFi Server in the app. You are being prompted to enter the IP in VSCode. If there is a dsconfig.json file present in your user home directory (from the vscode-droidscript-code extension) it is considered as input as well.
If you are satisfied with the result of your changes to the Docs, you can commit and push your changes to your copy of the repo and then send a Pull Request to DroidScript Docs.
If you notice flickering on the live preview when you type on the editor or when you save a file, it is due to live preview extension settings that will auto update when there are changes in the editor files. You can turn it off in VS Code by going to
"Settings > User > Extensions > Live Preview > Live Preview: Auto Refresh Preview"
And then select "Never"
.
- GineersLife: Jumar Hamac - [email protected]
- Symbroson: - [email protected]