{"library":"sourcemap-istanbul-instrumenter-loader","title":"istanbul-instrumenter-loader","type":"library","description":"Webpack loader that instruments JavaScript files with Istanbul for code coverage reporting. Version 0.2.0 is the latest stable release. This package is deprecated in favor of the official Istanbul monorepo loaders. It works with webpack 1 only and uses preLoaders. For webpack 2+, use babel-plugin-istanbul or the @istanbuljs/load-nyc-loader. Differentiator: it supports legacy webpack 1 projects; modern projects should use the official Istanbul toolchain.","language":"javascript","status":"deprecated","last_verified":"Sat Apr 25","install":{"commands":["npm install sourcemap-istanbul-instrumenter-loader"],"cli":null},"imports":["require('istanbul-instrumenter-loader')","preLoaders: [{ test: /\\.js$/, include: path.resolve('src/components/'), loader: 'istanbul-instrumenter' }]","loader: 'istanbul-instrumenter'"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/zakhenry/istanbul-instrumenter-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/sourcemap-istanbul-instrumenter-loader","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"// Install: npm i -D istanbul-instrumenter-loader istanbul karma karma-webpack karma-coverage\n\n// karma.conf.js\nconfig.set({\n  files: ['test/index.js'],\n  preprocessors: { 'test/index.js': 'webpack' },\n  webpack: {\n    module: {\n      preLoaders: [\n        {\n          test: /\\.js$/,\n          include: path.resolve('src/components/'),\n          loader: 'istanbul-instrumenter'\n        }\n      ]\n    }\n  },\n  reporters: ['progress', 'coverage'],\n  coverageReporter: { type: 'text' }\n});\n\n// test/index.js\nconst testsContext = require.context('./src/components/', true, /\\.js$/);\ntestsContext.keys().forEach(testsContext);\nconst componentsContext = require.context('../src/components/', true, /\\.js$/);\ncomponentsContext.keys().forEach(componentsContext);","lang":"javascript","description":"Shows webpack 1 karma setup with istanbul-instrumenter-loader in preLoaders for code coverage.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}