code: function vue(src, filePath) {
  	function toFunction (code) {
  		const transpile = require('vue-template-es2015-compiler')
  		return transpile('function render () {' + code + '}')
  	}
  	const vueCompiler = require('vue-template-compiler')
  	const parts = vueCompiler.parseComponent(src, { pad: true })
  	let script = ''
  	if (!parts.script.lang) {
  		script = babel(parts.script.content)
  	} else {
  		throw filePath + ': unknown <script lang="' + parts.script.lang + '">'
  	}
  	let html = ''
  	if (!parts.template.lang || parts.template.lang === 'html') {
  		html = parts.template.content
  	} else if (parts.template.lang === 'pug') {
  		html = require('pug').compile(parts.template.content)()
  	} else {
  		throw filePath + ': unknown <template lang="' + parts.template.lang + '">'
  	}
  	// mostly copy & paste from vueify
  	const compiled = vueCompiler.compile(html)
  	const template = {
  		render: toFunction(compiled.render),
  		staticRenderFns: '[' + compiled.staticRenderFns.map(toFunction).join(',') + ']'
  	}
  	let output = ''
  	output +=
  			';(function(){\n' + script + '\n})()\n' +
  			// babel 6 compat
  			'if (module.exports.__esModule) module.exports = module.exports.default\n'
  	output += 'var __vue__options__ = (typeof module.exports === "function"' +
  			'? module.exports.options' +
  			': module.exports)\n'
  	output +=
  			'__vue__options__.render = ' + template.render + '\n' +
  			'__vue__options__.staticRenderFns = ' + template.staticRenderFns + '\n'
  	return output
  }
docs: this is heavily based on vueify (Copyright (c) 2014-2016 Evan You)