How to use babel-plugin-istanbul - 1 common examples

To help you get started, we’ve selected a few babel-plugin-istanbul 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 macacajs / torchjs / lib / requireHook.js View on Github external
function compile (filename) {
  // merge in base options and resolve all the plugins and presets relative to this file
  babelrc.plugins = babelrc.plugins || [];
  babelrc.plugins.push(babelIstanbulPlugin);
  babelrc.plugins = uniq(babelrc.plugins);
  const transformOpts = new OptionManager().init(extend({}, babelrc, {
    sourceRoot: dirname(filename),
    filename
  }));
  const transformed = transform(readFileSync(filename, 'utf8'), transformOpts);
  return transformed.code;
}

babel-plugin-istanbul

A babel plugin that adds istanbul instrumentation to ES6 code

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

68 / 100
Full package analysis

Popular babel-plugin-istanbul functions