【发布时间】: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