{
"name": "swc",
"description": "SWC is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript",
"options": [
{
"names": [
"--filename",
"-f"
],
"description": "Filename to use when reading from stdin. This will be used in source maps and errors",
"takes_arg": true,
"arg": {
"name": "FILE",
"description": "Path to the file",
"template": "filepaths"
}
},
{
"names": [
"--config-file"
],
"description": "Path to a .swcrc file to use",
"takes_arg": true,
"arg": {
"name": "CONFIG_FILE",
"description": "Path to a .swcrc file to use",
"template": "filepaths"
}
},
{
"names": [
"--env-name"
],
"description": "The name of the 'env' to use when loading configs and plugins. Defaults to the value of SWC_ENV, or else NODE_ENV, or else development",
"takes_arg": true,
"arg": {
"name": "ENV_NAME",
"description": "The name of the 'env' to use when loading configs and plugins. Defaults to the value of SWC_ENV, or else NODE_ENV, or else development",
"suggestions": [
"production",
"development",
"test"
]
}
},
{
"names": [
"--no-swcrc"
],
"description": "Whether or not to look up .swcrc files"
},
{
"names": [
"--ignore"
],
"description": "List of glob paths to not compile",
"takes_arg": true,
"arg": {
"name": "PATH",
"description": "A glob path to not compile",
"template": "filepaths"
}
},
{
"names": [
"--only"
],
"description": "List of glob paths to only compile",
"takes_arg": true,
"arg": {
"name": "PATH",
"description": "A glob path to only compile",
"template": "filepaths"
}
},
{
"names": [
"--watch",
"-w"
],
"description": "Watch for changes and recompile"
},
{
"names": [
"--quiet",
"-q"
],
"description": "Suppress compilation output"
},
{
"names": [
"--source-maps",
"-s"
],
"description": "Generate source maps",
"takes_arg": true,
"arg": {
"name": "SOURCE_MAP",
"description": "Source map type",
"suggestions": [
"true",
"false",
"inline",
"both"
]
}
},
{
"names": [
"--source-map-target"
],
"description": "Define the file for the source map",
"takes_arg": true,
"arg": {
"name": "FILE",
"description": "The file for the source map",
"template": "filepaths"
}
},
{
"names": [
"--source-file-name"
],
"description": "Set sources[0] on returned source map"
},
{
"names": [
"--source-root"
],
"description": "The root from which all sources are relative"
},
{
"names": [
"--out-file",
"-o"
],
"description": "Compile all input files into a single file",
"takes_arg": true,
"arg": {
"name": "OUTPUT_FILE",
"description": "The output file",
"template": "filepaths"
}
},
{
"names": [
"--out-dir",
"-d"
],
"description": "Compile an input directory of modules into an output directory",
"takes_arg": true,
"arg": {
"name": "OUTPUT_DIR",
"description": "The output directory",
"template": "folders"
}
},
{
"names": [
"--copy-files",
"-D"
],
"description": "When compiling a directory, copy over non-compilable files"
},
{
"names": [
"--include-dotfiles"
],
"description": "Include dotfiles when compiling and copying non-compilable files"
},
{
"names": [
"--config",
"-C"
],
"description": "Override a config from .swcrc file",
"takes_arg": true,
"arg": {
"name": "CONFIG_FILE",
"description": "Path to .swcrc file",
"template": "filepaths"
}
},
{
"names": [
"--sync"
],
"description": "Invoke swc synchronously. Useful for debugging"
},
{
"names": [
"--log-watch-compilation"
],
"description": "Log a message when a watched file is successfully compiled"
},
{
"names": [
"--extensions"
],
"description": "Log a message when a watched file is successfully compiled"
}
]
}