【发布时间】:2015-07-28 02:44:19
【问题描述】:
我正在使用grunt-babel 将 ES6 转换为 ES5。我的文件名之一是 app.collection.js,在运行任务后,它的文件重命名为 app.js 。
解决此问题的babel option 是什么。
/****************************************************************************
* Grunt Babel Compile ES6 to ES5
****************************************************************************/
babel: {
options: {
blacklist: ['strict'],
comments: true,
loose: ["es6.classes", "es6.properties.computed"],
"ignore": [
]
},
dist: {
files: [{ // Dictionary of files
expand: true,
cwd: '<%= config.path.app.js %>',
src: ['**/**/*.js'],
dest: '<%= config.path.app.js %>',
ext: '.js'
}]
}
}
【问题讨论】:
-
如果您分享相关代码会有所帮助
-
@sfletche 更新了问题。请检查您是否可以提供帮助!