【问题标题】:VS Code Extension Settings CLIVS 代码扩展设置 CLI
【发布时间】:2020-06-09 07:31:22
【问题描述】:

我想创建一个用于设置 VS Code 的自动化脚本。 其中一部分是安装扩展并根据需要进行配置。

所以我能够通过 CLI 安装扩展,但无法找到如何仅使用命令行来更改扩展设置。

例如 - 我想更改 Jest Runner 设置。我在他们的自述文件中找到了这个:

Jest Runner will work out of the box, with a valid Jest config.   
If you have a custom setup use the following options to configure Jest Runner:

| Command | Description |
| --- | --- |
| jestrunner.configPath | Jest config path (relative to ${workFolder} e.g. jest-config.json) |
| jestrunner.jestPath | Absolute path to jest bin file (e.g. /usr/lib/node_modules/jest/bin/jest.js) |
| jestrunner.debugOptions | Add or overwrite vscode debug configurations (only in debug mode) (e.g. `"jestrunner.debugOptions": { "args": ["--no-cache"] }`) |
| jestrunner.runOptions | Add CLI Options to the Jest Command (e.g. `"jestrunner.runOptions": ["--coverage", "--colors"]`) https://jestjs.io/docs/en/cli |
| jestrunner.jestCommand | Define an alternative Jest command (e.g. for Create React App and similar abstractions) |
| jestrunner.disableCodeLens | Disable CodeLens feature
| jestrunner.codeLensSelector | CodeLens will be shown on files matching this pattern (default **/*.{test,spec}.{js,jsx,ts,tsx})

但不知道如何通过cmd访问。

关于如何做到这一点的任何想法? 谢谢!

【问题讨论】:

    标签: visual-studio-code cmd command-line command-line-interface


    【解决方案1】:

    现在能够找到解决方案。 所以事实证明,设置实际上存储在:

    <userFolder>\AppData\Roaming\Code\User\Settings.json

    从那里我可以打开 json 文件并添加扩展程序自述文件中指定的命令。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-14
      • 2020-12-15
      • 2021-08-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多