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 } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/swc.ts" license = "MIT" [[commands.field]] id = "out_file" label = "Output file" type = "path" path = { kind = "file", role = "output" } option = ["--out-file", "-o"] effect = "overwrite" sources = ["fig"] [[commands.field]] id = "out_dir" label = "Output directory" type = "path" path = { kind = "directory", role = "output" } option = ["--out-dir", "-d"] sources = ["fig"] [[commands.field]] id = "watch" label = "Watch for changes" type = "boolean" option = ["--watch", "-w"] sources = ["fig"] [[commands.field]] 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"] [[commands.field]] id = "copy_files" label = "Copy non-compilable files" type = "boolean" option = ["--copy-files", "-D"] sources = ["fig"] [[commands.field]] id = "config_file" label = "Config file (.swcrc)" type = "path" path = { kind = "file", role = "input" } option = ["--config-file"] sources = ["fig"] [[commands.field]] id = "no_swcrc" label = "Ignore .swcrc files" type = "boolean" option = ["--no-swcrc"] sources = ["fig"] [[commands.field]] id = "quiet" label = "Quiet" type = "boolean" option = ["--quiet", "-q"] sources = ["fig"] [[commands.field]] id = "input" label = "Input files or directories" type = "path" path = { kind = "any", role = "input" } position = 0 multiple = true sources = ["fig"] [[commands.task]] id = "dir" label = "Compile directory" fields = ["input", "out_dir", "copy_files", "source_maps", "watch"] required = ["input", "out_dir"] [[commands.task]] id = "file" label = "Compile to one file" fields = ["input", "out_file", "source_maps"] required = ["input", "out_file"] [[commands.group]] id = "basic" label = "Basic" fields = ["input", "out_dir", "out_file", "watch", "source_maps"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["copy_files", "config_file", "no_swcrc", "quiet"]