{
    "mode": "man",
    "parameter": "BABEL.JS",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/BABEL.JS/1/json",
    "generated": "2026-11-10T08:57:56Z",
    "synopsis": "babel [options] <files ...>",
    "sections": {
        "NAME": {
            "content": "babel.js - The compiler for writing next generation JavaScript\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "babel [options] <files ...>\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-f --filename",
                    "content": "The  filename to use when reading from stdin. This will be used in source-maps, errors\netc.\n\n--presets [list]\nA comma-separated list of preset names.\n\n--plugins [list]\nA comma-separated list of plugin names.\n\n--config-file [path]\nPath to a .babelrc file to use.\n\n--env-name [name]\nThe name of the 'env' to use when loading configs and plugins. Defaults to  the  value\nof BABELENV, or else NODEENV, or else 'development'.\n\n--root-mode [mode]\nThe  project-root  resolution  mode.  One  of  'root' (the default), 'upward', or 'up‐\nward-optional'.\n\n--source-type [script|module]\n",
                    "flag": "-f",
                    "long": "--filename"
                },
                {
                    "name": "--no-babelrc",
                    "content": "Whether or not to look up .babelrc and .babelignore files.\n\n--ignore [list]\nList of glob paths to not compile.\n\n--only [list]\nList of glob paths to only compile.\n",
                    "long": "--no-babelrc"
                },
                {
                    "name": "--no-highlight-code",
                    "content": "Enable or disable ANSI syntax highlighting of code frames. (on by default)\n",
                    "long": "--no-highlight-code"
                },
                {
                    "name": "--no-comments",
                    "content": "Write comments to generated output. (true by default)\n",
                    "long": "--no-comments"
                },
                {
                    "name": "--retain-lines",
                    "content": "Retain line numbers. This will result in really ugly code.\n\n--compact [true|false|auto]\nDo not include superfluous whitespace characters and line terminators.\n",
                    "long": "--retain-lines"
                },
                {
                    "name": "--minified",
                    "content": "Save as many bytes when printing. (false by default)\n\n--auxiliary-comment-before [string]\nPrint a comment before any injected non-user code.\n\n--auxiliary-comment-after [string]\nPrint a comment after any injected non-user code.\n",
                    "long": "--minified"
                },
                {
                    "name": "-s --source-maps",
                    "content": "--source-map-target [string]\nSet `file` on returned source map.\n\n--source-file-name [string]\nSet `sources[0]` on returned source map.\n\n--source-root [filename]\nThe root from which all sources are relative.\n\n--module-root [filename]\nOptional prefix for the AMD module formatter that will be prepended to the filename on\nmodule definitions.\n",
                    "flag": "-s",
                    "long": "--source-maps"
                },
                {
                    "name": "-M --module-ids",
                    "content": "Insert an explicit id for modules.\n\n--module-id [string]\nSpecify a custom name for module ids.\n",
                    "flag": "-M",
                    "long": "--module-ids"
                },
                {
                    "name": "-x --extensions",
                    "content": "List  of  extensions   to   compile   when   a   directory   has   been   the   input.\n[.js,.jsx,.es6,.es,.mjs,.cjs]\n",
                    "flag": "-x",
                    "long": "--extensions"
                },
                {
                    "name": "--keep-file-extension",
                    "content": "Preserve the file extensions of the input files.\n",
                    "long": "--keep-file-extension"
                },
                {
                    "name": "-w --watch",
                    "content": "Recompile files on changes.\n",
                    "flag": "-w",
                    "long": "--watch"
                },
                {
                    "name": "--skip-initial-build",
                    "content": "Do not compile files before watching.\n",
                    "long": "--skip-initial-build"
                },
                {
                    "name": "-o --out-file",
                    "content": "Compile all input files into a single file.\n",
                    "flag": "-o",
                    "long": "--out-file"
                },
                {
                    "name": "-d --out-dir",
                    "content": "Compile an input directory of modules into an output directory.\n",
                    "flag": "-d",
                    "long": "--out-dir"
                },
                {
                    "name": "--relative",
                    "content": "Compile  into  an  output  directory  relative  to  input  directory or file. Requires\n--out-dir [out]\n",
                    "long": "--relative"
                },
                {
                    "name": "-D --copy-files",
                    "content": "When compiling a directory copy over non-compilable files.\n",
                    "flag": "-D",
                    "long": "--copy-files"
                },
                {
                    "name": "--include-dotfiles",
                    "content": "Include dotfiles when compiling and copying non-compilable files.\n",
                    "long": "--include-dotfiles"
                },
                {
                    "name": "--no-copy-ignored",
                    "content": "Exclude ignored files when copying non-compilable files.\n",
                    "long": "--no-copy-ignored"
                },
                {
                    "name": "--verbose",
                    "content": "Log everything. This option conflicts with --quiet\n",
                    "long": "--verbose"
                },
                {
                    "name": "--quiet",
                    "content": "Don't log anything. This option conflicts with --verbose\n",
                    "long": "--quiet"
                },
                {
                    "name": "--delete-dir-on-start",
                    "content": "Delete the out directory before compilation.\n\n--out-file-extension [string]\nUse a specific extension for the output files\n",
                    "long": "--delete-dir-on-start"
                },
                {
                    "name": "-V --version",
                    "content": "output the version number\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-h --help",
                    "content": "display help for command\n\nbabel.js 7.20.15+ds1+~cs214.269.168         February 2024                                BABEL.JS(1)",
                    "flag": "-h",
                    "long": "--help"
                }
            ]
        }
    },
    "summary": "babel.js - The compiler for writing next generation JavaScript",
    "flags": [
        {
            "flag": "-f",
            "long": "--filename",
            "arg": null,
            "description": "The filename to use when reading from stdin. This will be used in source-maps, errors etc. --presets [list] A comma-separated list of preset names. --plugins [list] A comma-separated list of plugin names. --config-file [path] Path to a .babelrc file to use. --env-name [name] The name of the 'env' to use when loading configs and plugins. Defaults to the value of BABELENV, or else NODEENV, or else 'development'. --root-mode [mode] The project-root resolution mode. One of 'root' (the default), 'upward', or 'up‐ ward-optional'. --source-type [script|module]"
        },
        {
            "flag": "",
            "long": "--no-babelrc",
            "arg": null,
            "description": "Whether or not to look up .babelrc and .babelignore files. --ignore [list] List of glob paths to not compile. --only [list] List of glob paths to only compile."
        },
        {
            "flag": "",
            "long": "--no-highlight-code",
            "arg": null,
            "description": "Enable or disable ANSI syntax highlighting of code frames. (on by default)"
        },
        {
            "flag": "",
            "long": "--no-comments",
            "arg": null,
            "description": "Write comments to generated output. (true by default)"
        },
        {
            "flag": "",
            "long": "--retain-lines",
            "arg": null,
            "description": "Retain line numbers. This will result in really ugly code. --compact [true|false|auto] Do not include superfluous whitespace characters and line terminators."
        },
        {
            "flag": "",
            "long": "--minified",
            "arg": null,
            "description": "Save as many bytes when printing. (false by default) --auxiliary-comment-before [string] Print a comment before any injected non-user code. --auxiliary-comment-after [string] Print a comment after any injected non-user code."
        },
        {
            "flag": "-s",
            "long": "--source-maps",
            "arg": null,
            "description": "--source-map-target [string] Set `file` on returned source map. --source-file-name [string] Set `sources[0]` on returned source map. --source-root [filename] The root from which all sources are relative. --module-root [filename] Optional prefix for the AMD module formatter that will be prepended to the filename on module definitions."
        },
        {
            "flag": "-M",
            "long": "--module-ids",
            "arg": null,
            "description": "Insert an explicit id for modules. --module-id [string] Specify a custom name for module ids."
        },
        {
            "flag": "-x",
            "long": "--extensions",
            "arg": null,
            "description": "List of extensions to compile when a directory has been the input. [.js,.jsx,.es6,.es,.mjs,.cjs]"
        },
        {
            "flag": "",
            "long": "--keep-file-extension",
            "arg": null,
            "description": "Preserve the file extensions of the input files."
        },
        {
            "flag": "-w",
            "long": "--watch",
            "arg": null,
            "description": "Recompile files on changes."
        },
        {
            "flag": "",
            "long": "--skip-initial-build",
            "arg": null,
            "description": "Do not compile files before watching."
        },
        {
            "flag": "-o",
            "long": "--out-file",
            "arg": null,
            "description": "Compile all input files into a single file."
        },
        {
            "flag": "-d",
            "long": "--out-dir",
            "arg": null,
            "description": "Compile an input directory of modules into an output directory."
        },
        {
            "flag": "",
            "long": "--relative",
            "arg": null,
            "description": "Compile into an output directory relative to input directory or file. Requires --out-dir [out]"
        },
        {
            "flag": "-D",
            "long": "--copy-files",
            "arg": null,
            "description": "When compiling a directory copy over non-compilable files."
        },
        {
            "flag": "",
            "long": "--include-dotfiles",
            "arg": null,
            "description": "Include dotfiles when compiling and copying non-compilable files."
        },
        {
            "flag": "",
            "long": "--no-copy-ignored",
            "arg": null,
            "description": "Exclude ignored files when copying non-compilable files."
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "Log everything. This option conflicts with --quiet"
        },
        {
            "flag": "",
            "long": "--quiet",
            "arg": null,
            "description": "Don't log anything. This option conflicts with --verbose"
        },
        {
            "flag": "",
            "long": "--delete-dir-on-start",
            "arg": null,
            "description": "Delete the out directory before compilation. --out-file-extension [string] Use a specific extension for the output files"
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "output the version number"
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "display help for command babel.js 7.20.15+ds1+~cs214.269.168 February 2024 BABEL.JS(1)"
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "not_found",
        "examples": []
    }
}