Sha256: ccf04ff0893f8cc35148b21d715ae07e734b804146d4762ed0eebf0914054119
Contents?: true
Size: 690 Bytes
Versions: 3
Compression:
Stored size: 690 Bytes
Contents
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 } } 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 }
Version data entries
3 entries across 3 versions & 1 rubygems