Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>live-dslNew to Visual Studio Code? Get it now.
live-dsl

live-dsl

byted-livedsl

|
6 installs
| (0) | Free
直播DSL开发插件,用于 DSL 的编译、调试、发布等
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Document Editing Sample

直播 DSL 开发插件,支持 ttml 转 json 以及搭配 sdk 实现 apply change 功能

  1. ttml2json 用于将 ttml 文本转 json 格式
  2. connect android app 连接到 android server 45678 端口
  3. apply change 将ttml 转 json 后发送给 android app,用于实时更新

Demo

VS Code API

//通信内容以 -vvv 结尾
//通信数据格式为 base64 编码 字符串,解码后格式如下
{
	name: '文件名',
	data: 'json 数据'
}

vscode module

  • commands.registerCommand
  • window.activeTextEditor
  • TextDocument.getText
  • TextEditor.edit
  • TextEditorEdit

Contribution Points

  • contributes.commands

Running the Sample

  • Run npm install in terminal to install dependencies
  • Run the Run Extension target in the Debug View. This will:
    • Start a task npm: watch to compile the code
    • Run the extension in a new VS Code window

编译出server的文件

  • Run npm run test-compile
  • Run cd out
  • Run pkg -t node16-linux-x64 server_bin.js
  • 替换pack.manager的scripts中dsl_bin文件
  • 依赖问题:
    • Run npm install
    • Run npm install --save-dev @babel/types(demo)
    • Run npm install -g pkg
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft