这是indexloc提供的服务,不要输入任何密码
Skip to content

Alternative config format supporting comments (like YAML) #1470

@trevorr

Description

@trevorr

Describe the feature you'd like to request

I'd like a richer alternative to turbo.json, such as turbo.yaml. JSON is ubiquitous and great for data exchange, but it lacks several features of a good source code format. In particular, it doesn't have a way to include comments, which are extremely useful for capturing organizational knowledge, such as why things were done a certain way or what known issues exist. Its simple, rigid syntax is also not the most user-friendly for manually written files.

Describe the solution you'd like

If Turborepo is run in a directory that doesn't have a turbo.json file, but does have a turbo.yaml file, use that for configuration. Supporting YAML would add the following features essentially for free (since parsed and resolved YAML is equivalent to JSON):

  • comments
  • anchors, aliases, and extensions (for avoiding repetition)
  • improved readability due to reduced syntax (e.g. quoting)

Describe alternatives you've considered

One could generate turbo.json from turbo.yaml by introducing a wrapper around turbo that translates the configuration file before running turbo.

Related to #217

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions