How to use the vue-native-template-compiler.nativeCompiler function in vue-native-template-compiler

To help you get started, we’ve selected a few vue-native-template-compiler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GeekyAnts / vue-native-core / src / platforms / vue-native / scripts / compiler.js View on Github external
function parseTemplate(code) {
  const obj = compiler.nativeCompiler(code);
  return {
    import: obj.importCode,
    render: `const ${constants.TEMPLATE_RENDER} = ${obj.renderCode}`
  };
}
github GeekyAnts / vue-native-core / packages / vue-native-scripts / build.js View on Github external
function parseTemplate(code) {
  var obj = compiler.nativeCompiler(code);
  return {
    import: obj.importCode,
    render: ("const " + (constants.TEMPLATE_RENDER) + " = " + (obj.renderCode))
  };
}
github syumai / vue-native-custom-transformer-plugin / compiler / parsers / parseTemplate.js View on Github external
function parseTemplate(template) {
  if (!template) {
    return defaultTemplate;
  }

  const { content, lang } = template;
  const trimmedContent = content.replace(/\/\/\n/g, '');
  const transpiledContent = transpileTemplateContent(trimmedContent, lang);
  if (transpiledContent) {
    const obj = compiler.nativeCompiler(transpiledContent);
    return {
      import: obj.importCode,
      render: `const ${constants.TEMPLATE_RENDER} = ${obj.renderCode}`,
    };
  }
}

vue-native-template-compiler

Vue Native template compiler, dependency of vue-native-scripts. It can also be used as a stand-alone compiler

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis