docs: function load(buf, file, cfg) {
    if (typeof buf !== 'string') {
      throw new TypeError('First argument must be a string.');
    }
  
    cfg = Object.assign({
      maps: false,
      lang: {script: 'js', template: 'html'},
      plugins: {},
    }, cfg);
  
    let vue = {};
  
    for (let section of extract(buf, ['script', 'template'])) {
      let attrs = section.attrs;
      let lang = has(attrs, 'lang') ? attrs.lang : cfg.lang[section.tag];
  
      if (has(attrs, 'src')) {
        let dir = file ? path.dirname(file) : process.cwd();
  
        file = path.resolve(dir, attrs.src);
        section.text = fs.readFileSync(file, 'utf8');
      }
  
      let transpiled = transpile(lang, section.text, {
        file,
        maps: cfg.maps,
        offset: section.offset,
        extra: Object.assign({}, cfg.plugins[lang]),
      });
  
      vue[section.tag] = transpiled.data;
  
      if (cfg.maps && transpiled.map) {
        sourceMapsCache.set(file, transpiled.map);
      }
    }
  
    vue.script += injectTemplate(vue.template);
  
    return vue.script;
  }