babel/doc/usage/options.md
2015-01-05 23:27:46 -08:00

2.1 KiB

layout title description permalink
docs Options Options for 6to5 transpiling. /docs/usage/options/

Usage

to5.transform(code, options);
$ 6to5 --name=value

Options

Option Default Description
filename "unknown" Filename for use in errors etc.
fileNameRelative (filename) Filename relative to sourceRoot.
blacklist [] Array of transformers to exclude. Run 6to5 --help to see a full list of transformers.
whitelist [] Array of transformers to only use. Run 6to5 --help to see a full list of transformers.
modules "common" Which module formatter to use. Run 6to5 --help to see a full list of module formatters.
sourceMap false If truthy, adds a map property to returned output. If set to "inline", a comment with a sourceMappingURL directive is added to the bottom of the returned code.
sourceMapName (filenameRelative) Set file on returned source map.
sourceFileName (filenameRelative) Set sources[0] on returned source map.
sourceRoot (moduleRoot) The root from which all sources are relative.
moduleRoot (sourceRoot) Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions.
amdModuleIds false If truthy, insert an explicit id for each defined AMD module. By default, AMD modules are anonymous.
runtime false Optionally replace all 6to5 helper declarations with a referenece to this variable. If set to true then the default namespace is used to5Runtime.
comments true Output comments in generated output.
experimental false Enable support for experimental ES7 features.