{
  "id": "swc",
  "name": "SWC",
  "description": "Super-fast Rust-based compiler producing JavaScript from modern JavaScript and TypeScript.",
  "executables": [
    "swc"
  ],
  "commands": {
    "format": 1,
    "label": "Compile with swc",
    "description": "Compile files or a directory to JavaScript. Config overrides and extra debugging flags are not in this form.",
    "quality": "ai-draft",
    "base": "fig:swc",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/swc.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "out_file",
        "label": "Output file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "--out-file",
          "-o"
        ],
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "out_dir",
        "label": "Output directory",
        "type": "path",
        "path": {
          "kind": "directory",
          "role": "output"
        },
        "option": [
          "--out-dir",
          "-d"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "watch",
        "label": "Watch for changes",
        "type": "boolean",
        "option": [
          "--watch",
          "-w"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "source_maps",
        "label": "Source maps",
        "type": "string",
        "option": [
          "--source-maps",
          "-s"
        ],
        "suggestions": [
          {
            "value": "true",
            "label": "true"
          },
          {
            "value": "false",
            "label": "false"
          },
          {
            "value": "inline",
            "label": "inline"
          },
          {
            "value": "both",
            "label": "both"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "copy_files",
        "label": "Copy non-compilable files",
        "type": "boolean",
        "option": [
          "--copy-files",
          "-D"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "config_file",
        "label": "Config file (.swcrc)",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--config-file"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_swcrc",
        "label": "Ignore .swcrc files",
        "type": "boolean",
        "option": [
          "--no-swcrc"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "input",
        "label": "Input files or directories",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 0,
        "multiple": true,
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "dir",
        "label": "Compile directory",
        "fields": [
          "input",
          "out_dir",
          "copy_files",
          "source_maps",
          "watch"
        ],
        "required": [
          "input",
          "out_dir"
        ]
      },
      {
        "id": "file",
        "label": "Compile to one file",
        "fields": [
          "input",
          "out_file",
          "source_maps"
        ],
        "required": [
          "input",
          "out_file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "input",
          "out_dir",
          "out_file",
          "watch",
          "source_maps"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "copy_files",
          "config_file",
          "no_swcrc",
          "quiet"
        ]
      }
    ]
  }
}
