6to5-brunch 中文文档教程
6to5-brunch
Brunch插件使用6to5转ES6代码 进入 vanilla ES5,无需运行时。
您项目中的所有 .js
文件都将通过 6to5 编译器运行, 除了那些被配置为忽略的。
Installation
npm install --save 6to5-brunch
Configuration
在早午餐中设置 6to5 选项 配置(例如brunch-config.coffee
)除了filename
和sourceMap
内部处理。
此外,您可以设置一个 ignore
值来指定哪些 .js
文件在 您的项目不应由 6to5 编译。 默认情况下,ignore
设置为 <代码>/^(bower_components|供应商)/。
plugins:
ES6to5:
whitelist: ['arrowFunctions']
format:
semicolons: false
ignore: [
/^(bower_components|vendor)/
'app/legacyES5Code/**/*'
]
Change Log
License
6to5-brunch
Brunch plugin using 6to5 to turn ES6 code into vanilla ES5 with no runtime required.
All the .js
files in your project will be run through the 6to5 compiler, except those it is configured to ignore.
Installation
npm install --save 6to5-brunch
Configuration
Set 6to5 options in your brunch config (such as brunch-config.coffee
) except for filename
and sourceMap
which are handled internally.
Additionally, you can set an ignore
value to specify which .js
files in your project should not be compiled by 6to5. By default, ignore
is set to /^(bower_components|vendor)/
.
plugins:
ES6to5:
whitelist: ['arrowFunctions']
format:
semicolons: false
ignore: [
/^(bower_components|vendor)/
'app/legacyES5Code/**/*'
]
Change Log
See release notes page on GitHub