How to use babel-helper-evaluate-path - 1 common examples

To help you get started, we’ve selected a few babel-helper-evaluate-path 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 giuseppeg / style-sheet / src / babel.js View on Github external
function evaluate(babel, path, state) {
  let result = evaluateSimple(path)
  if (result.confident) {
    return {
      value: compileRule(result.value),
      dependencies: [],
    }
  }

  try {
    result = evaluateComplex(
      path,
      babel.types,
      state.file.opts.filename,
      text => {
        return babel.transformSync(text, {
          babelrc: false,
          filename: state.file.opts.filename,

babel-helper-evaluate-path

path.evaluate wrapped in a try catch

MIT
Latest version published 6 years ago

Package Health Score

67 / 100
Full package analysis

Popular babel-helper-evaluate-path functions