How to use the @riotjs/compiler/dist/compiler.compile function in @riotjs/compiler

To help you get started, we’ve selected a few @riotjs/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 riot / riot / src / riot+compiler.js View on Github external
function compileFromString(string, options) {
  return compiler.compile(string, options)
}
github riot / riot / src / riot+compiler.js View on Github external
async function compileFromUrl(url, options) {
  const response = await fetch(url)
  const code = await response.text()

  return compiler.compile(code, { file: url, ...options })
}
github riot / riot / src / riot+compiler.js View on Github external
function compileFromString(string, options) {
  return compiler.compile(string, options)
}
github riot / riot / src / riot+compiler.js View on Github external
async function compileFromUrl(url) {
  const response = await fetch(url)
  const code = await response.text()

  return compiler.compile(code, { file: url })
}

@riotjs/compiler

Compiler for Riot.js .riot files

MIT
Latest version published 10 days ago

Package Health Score

66 / 100
Full package analysis