1 Star 0 Fork 0

Vue.js/vue-template-es2015-compiler

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.js 744 Bytes
一键复制 编辑 原始数据 按行查看 历史
var buble = require('./buble.js')
// selectively support some handy ES2015 features in templates.
var defaultOptions = {
transforms: {
modules: false,
// this is a custom feature for stripping with from Vue render functions.
stripWith: true,
// custom feature ensures with context targets functional render
stripWithFunctional: false
},
// allow spread...
objectAssign: 'Object.assign'
}
module.exports = function transpile (code, opts) {
if (opts) {
opts = Object.assign({}, defaultOptions, opts)
opts.transforms = Object.assign({}, defaultOptions.transforms, opts.transforms)
} else {
opts = defaultOptions
}
var code = buble.transform(code, opts).code
// console.log(code)
return code
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vuejs/vue-template-es2015-compiler.git
git@gitee.com:vuejs/vue-template-es2015-compiler.git
vuejs
vue-template-es2015-compiler
vue-template-es2015-compiler
master

搜索帮助