Task Definitions: '.babelrc'
Template Definitions: 'assert'
Batcher Defintions: None
Performs a single-file Babel compilation using the Babel CLI.
auto-install
(Boolean, default:true
): Whether to automatically install@babel/core
,@babel/cli
and the used presets or plugins with npm if not present (using the npm extension). The global npm extensionauto-install
option will take precedence here if not otherwise set.babel-rc
(Boolean, default:false
): Whether to read the.babelrc
configuration in the current project (and creating it if it doesn't exist).config-file
(String): A custom Babel configuration file to use.plugins
(String[]): List of plugins to use.presets
(String[]): List of presets to use.source-maps
(Boolean, default:true
): Whether to output a source map for each compiled file.
chompfile.toml
version = 0.1
extensions = ['[email protected]:babel']
[[task]]
name = 'test'
target = 'lib/#.js'
dep = 'src/#.js'
template = 'babel'
[task.template-options]
presets = ['@babel/preset-typescript']
When ejecting the template, only the Babel compilation CLI command will be ejected, without any .babelrc
or auto installation tasks.
When setting babel-rc = true
in the template options, the BabelRc Task will ensure the .babelrc
exists, and if it does not will initialize a default .babelrc
with an empty default configuration:
Most future work is recommended on the SWC extension as a preferable and faster alternative to the Babel extension.