ACC React 模板生成工具 适用于VSCode
- 请勿在.gitignore文件中添加.vscode
开发调试
- 拉取仓库到本地
- 执行
yarn
- 按下
F5 键(或Fn + F5 )
- 在新打开的窗口中进行调试
打包生成.vsix文件
发布到应用商店
- 发布前保证
git 工作区干净
- 手动修改版本号
- 执行
yarn run publish
F5键原理
This is what happens when pressing F5:
.vscode/launch.json instructs to first run a task named npm.
.vscode/tasks.json defines the task npm as a shell command to npm run compile.
package.json defines the script compile as node ./node_modules/vscode/bin/compile -watch -p ./
- This eventually invokes the TypeScript compiler included in node_modules, which generates
out/src/extension.js and out/src/extension.js.map .
- Once the TypeScript compilation task is finished, the
code --extensionDevelopmentPath=${workspaceRoot} process is spawned.
- The second instance of VS Code is launched in a special mode and it searches for an extension at
${workspaceRoot} .
参考文档
- React Component Generator
- Extensions Manifest
- VSCode Mock Debug
- Contribution Points
- API文档
| |