VS Code .code-workspace 文件生成器
(用于具有 Dart 和 Flutter 项目的 monorepositories)
简而言之;
- 创建 yaml 文件
config.yaml(请查看 #Format 部分) - 运行
workspace_gen.exe path/to/config.yaml(workspace_gen.exe可在 Win 和 UNIX 系统上运行) - 从
outputs/目录复制您的.code-workspace文件
示例
查看 config.yaml 的示例和生成的文件
config.yaml
project_name.code-workspace
格式
name: project_name # Required. Will be used for `.code-workspace` filename.
projects: # Required. No projects - no workspace ¯\_(ツ)_/¯
# project #1
example_app: # Required. Path to flutter/dart project, relative to workspace location.
type:
flutter # Required. Type of the project
# `dart` or `flutter`
name:
Flutter Project # Optional. Name of the project.
# This name will be shown in VS Code Explorer.
# Default - use project path as name
launchConfig: # Optional. If present - generate launch tasks (debug/release).
# Default - no launch tasks
flavors: # Optional. If present - generate launch tasks using specified flavors.
# Default - no build tasks
- dev
- prod
buildTasks: # Optional. If present - generate build tasks.
# Available values:
# - analyze
# - pubGet
# - clean
# - build (build_runner build --delete-conflicting-outputs)
# - localize (gen-l10n)
- analyze
- pubGet
- clean
- build
- localize