{"_id":"isparta-loader","_rev":"14-ab023760d6c3f13d79f14717bfbdce0c","name":"isparta-loader","description":"isparta instrumenter loader for webpack","dist-tags":{"latest":"2.0.0"},"versions":{"0.1.0":{"name":"isparta-loader","version":"0.1.0","description":"isparta instrumenter loader for webpack","keywords":["webpack","loader","isparta","istanbul","coverage"],"homepage":"https://github.com/deepsweet/isparta-loader","repository":{"type":"git","url":"git://github.com/deepsweet/isparta-loader.git"},"author":{"name":"Kir Belevich","email":"kir@soulshine.in","url":"https://github.com/deepsweet"},"main":"index.js","dependencies":{"isparta":"2.2.x","loader-utils":"0.x.x","lodash.assign":"3.x.x"},"peerDependencies":{"webpack":"1.x.x"},"engines":{"node":">=0.10.0"},"license":"WTFPL","gitHead":"742602f4d109f858e2ad48b494fde81f6f9dd764","bugs":{"url":"https://github.com/deepsweet/isparta-loader/issues"},"_id":"isparta-loader@0.1.0","scripts":{},"_shasum":"0fc1dd54d5cc8dffcf7e21a1d1543dcdb4f4d554","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.0","_npmUser":{"name":"deepsweet","email":"kir@soulshine.in"},"maintainers":[{"name":"deepsweet","email":"kir@soulshine.in"}],"dist":{"shasum":"0fc1dd54d5cc8dffcf7e21a1d1543dcdb4f4d554","tarball":"https://registry.npmjs.org/isparta-loader/-/isparta-loader-0.1.0.tgz","integrity":"sha512-teDMfS6w2H6/9zxE7d/yyUboDi6VSfzBXVrq8f3FJXmkgphCBDpoJh9BceG0/tH5yvyJIuCON5JWZN354yQVvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpApvGJ9C1nzvjY9hkWZJGdkIhI+ak5PhB2I57mqAV5AIhAJ3UhkUKBJ/G+ro+KBGXr1A6gtgYCBey0zBwsFqYTWJl"}]},"deprecated":"Package is deprecated, use https://github.com/deepsweet/istanbul-instrumenter-loader"},"0.2.0":{"name":"isparta-loader","version":"0.2.0","description":"isparta instrumenter loader for webpack","keywords":["webpack","loader","isparta","istanbul","coverage"],"homepage":"https://github.com/deepsweet/isparta-loader","repository":{"type":"git","url":"git://github.com/deepsweet/isparta-loader.git"},"author":{"name":"Kir Belevich","email":"kir@soulshine.in","url":"https://github.com/deepsweet"},"main":"index.js","dependencies":{"isparta":"3.x.x","loader-utils":"0.x.x","lodash.assign":"3.x.x"},"peerDependencies":{"webpack":"1.x.x"},"engines":{"node":">=0.10.0"},"license":"WTFPL","gitHead":"27093600f86be0baa4641309574b5d854f543de5","bugs":{"url":"https://github.com/deepsweet/isparta-loader/issues"},"_id":"isparta-loader@0.2.0","scripts":{},"_shasum":"2875b3ce69258cc24627862342adbf4bb415bcf5","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.12.2","_npmUser":{"name":"deepsweet","email":"kir@soulshine.in"},"maintainers":[{"name":"deepsweet","email":"kir@soulshine.in"}],"dist":{"shasum":"2875b3ce69258cc24627862342adbf4bb415bcf5","tarball":"https://registry.npmjs.org/isparta-loader/-/isparta-loader-0.2.0.tgz","integrity":"sha512-jxNFNoJl4XlKOq9t1WODAAgmTzNn0W5a+X9fwiW5I/VCfZ4pNN9KuZx1uHx9MZVmH1S4XPkaAr6CXVVtrrjINg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwn9pRFMSL8dhW+NE8zlE3cP9HfrPM8rTMnbk6+4UF1AiEAjH1FN5r2MbIDUJYC/SAheRUAcvmY34UsxTqXnMeWPYE="}]},"deprecated":"Package is deprecated, use https://github.com/deepsweet/istanbul-instrumenter-loader"},"1.0.0":{"name":"isparta-loader","version":"1.0.0","description":"isparta instrumenter loader for webpack","keywords":["webpack","loader","isparta","istanbul","coverage"],"homepage":"https://github.com/deepsweet/isparta-loader","repository":{"type":"git","url":"git+https://github.com/deepsweet/isparta-loader.git"},"author":{"name":"Kir Belevich","email":"kir@soulshine.in","url":"https://github.com/deepsweet"},"main":"index.js","files":["index.js"],"dependencies":{"isparta":"3.x.x"},"engines":{"node":">=0.10.0"},"license":"WTFPL","gitHead":"937451744de9b59872e41d699affc133d7a96512","bugs":{"url":"https://github.com/deepsweet/isparta-loader/issues"},"_id":"isparta-loader@1.0.0","scripts":{},"_shasum":"f65859c5377baf023a208b5760558269a778e192","_from":".","_npmVersion":"3.3.4","_nodeVersion":"0.12.7","_npmUser":{"name":"deepsweet","email":"kir@soulshine.in"},"dist":{"shasum":"f65859c5377baf023a208b5760558269a778e192","tarball":"https://registry.npmjs.org/isparta-loader/-/isparta-loader-1.0.0.tgz","integrity":"sha512-qwwTwJgnQF6bB9aziLtfLsA9XecbuFBq0ieU7kfAfv5KvhCbrZx49NGN4edsiTfRURIim2b8hcjMfNezXZsihw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICkUwKb7jMaDZqJLN/EseyesMmX2PyQyRwedVMy9v3miAiEA8mWhqPvg/a6MKSJ+1Yo2trw6CUpuXUcWyGkBYILcVq8="}]},"maintainers":[{"name":"deepsweet","email":"kir@soulshine.in"}],"deprecated":"Package is deprecated, use https://github.com/deepsweet/istanbul-instrumenter-loader"},"2.0.0":{"name":"isparta-loader","version":"2.0.0","description":"isparta instrumenter loader for webpack","keywords":["webpack","loader","isparta","istanbul","coverage"],"homepage":"https://github.com/deepsweet/isparta-loader","repository":{"type":"git","url":"git+https://github.com/deepsweet/isparta-loader.git"},"author":{"name":"Kir Belevich","email":"kir@soulshine.in","url":"https://github.com/deepsweet"},"main":"index.js","files":["index.js"],"dependencies":{"isparta":"4.x.x"},"engines":{"node":">=0.10.0"},"license":"WTFPL","gitHead":"236bcf295affbf27e4a96766dcf4c123e875cb54","bugs":{"url":"https://github.com/deepsweet/isparta-loader/issues"},"_id":"isparta-loader@2.0.0","scripts":{},"_shasum":"4425f496c93f765bbceb4dd938576da307566ed1","_from":".","_npmVersion":"3.4.1","_nodeVersion":"5.1.0","_npmUser":{"name":"deepsweet","email":"kir@soulshine.in"},"dist":{"shasum":"4425f496c93f765bbceb4dd938576da307566ed1","tarball":"https://registry.npmjs.org/isparta-loader/-/isparta-loader-2.0.0.tgz","integrity":"sha512-/8yTTUmybJzbg/9tiodJH+wxnMY5x6wDhYTybnaXx/hr0g3XW7rlkx0deuzsWO8JLziCorgr4CNyWRZeefoSMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHogs/vvtzCUIr2OoGBoE+RKimWZX+MstJcgyYIMb4QcAiBAllRacTcjnQhukeHaaLodT5mF22UHqECi3sSKSwd09w=="}]},"maintainers":[{"name":"deepsweet","email":"kir@soulshine.in"}],"deprecated":"Package is deprecated, use https://github.com/deepsweet/istanbul-instrumenter-loader"}},"readme":"## isparta instrumenter loader for [webpack](https://webpack.github.io/)\n\n[![npm](http://img.shields.io/npm/v/isparta-loader.svg?style=flat-square)](https://www.npmjs.org/package/isparta-loader)\n[![deps](http://img.shields.io/david/deepsweet/isparta-loader.svg?style=flat-square)](https://david-dm.org/deepsweet/isparta-loader)\n\nInstrument Babel code with [isparta](https://github.com/douglasduteil/isparta) for subsequent code coverage reporting.\n\n### Install\n\n```sh\n$ npm i -D isparta-loader\n```\n\n### Setup\n\n#### References\n\n* [Using loaders](https://webpack.github.io/docs/using-loaders.html)\n* [karma-webpack](https://github.com/webpack/karma-webpack#karma-webpack)\n* [karma-coverage](https://github.com/karma-runner/karma-coverage#configuration)\n\n#### Project structure\n\nLet's say you have the following:\n\n```\n├── src/\n│   └── components/\n│       ├── bar/\n│       │   └── index.js\n│       └── foo/\n│           └── index.js\n└── test/\n    └── src/\n        └── components/\n            └── foo/\n                └── index.js\n```\n\nTo create a code coverage report for all components (even for those for which you have no tests yet) you have to require all the 1) sources and 2) tests. Something like it's described in [\"alternative usage\" of karma-webpack](https://github.com/webpack/karma-webpack#alternative-usage):\n\n#### test/index.js\n\n```js\n// require all `test/components/**/index.js`\nconst testsContext = require.context('./src/components/', true, /index\\.js$/);\n\ntestsContext.keys().forEach(testsContext);\n\n// require all `src/components/**/index.js`\nconst componentsContext = require.context('../src/components/', true, /index\\.js$/);\n\ncomponentsContext.keys().forEach(componentsContext);\n```\n\nThis file will be the only entry point for Karma:\n\n#### karma.conf.js\n\n```js\nconfig.set({\n    …\n    files: [\n        'test/index.js'\n    ],\n    preprocessors: {\n        'test/index.js': 'webpack'\n    },\n    webpack: {\n        …\n        module: {\n            preLoaders: [\n                // transpile all files except testing sources with babel as usual\n                {\n                    test: /\\.js$/,\n                    exclude: [\n                        path.resolve('src/components/'),\n                        path.resolve('node_modules/')\n                    ],\n                    loader: 'babel'\n                },\n                // transpile and instrument only testing sources with isparta\n                {\n                    test: /\\.js$/,\n                    include: path.resolve('src/components/'),\n                    loader: 'isparta'\n                }\n            ]\n        }\n        …\n    },\n    reporters: [ 'progress', 'coverage' ],\n    coverageReporter: {\n        type: 'text'\n    },\n    …\n});\n```\n\n### License\n[WTFPL](http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-strip.jpg)\n","maintainers":[{"name":"deepsweet","email":"kir@soulshine.in"}],"time":{"modified":"2022-06-19T03:06:44.388Z","created":"2015-03-17T09:45:06.171Z","0.1.0":"2015-03-17T09:45:06.171Z","0.2.0":"2015-04-05T09:15:25.149Z","1.0.0":"2015-09-18T07:21:49.401Z","2.0.0":"2015-11-19T02:58:07.447Z"},"homepage":"https://github.com/deepsweet/isparta-loader","keywords":["webpack","loader","isparta","istanbul","coverage"],"repository":{"type":"git","url":"git+https://github.com/deepsweet/isparta-loader.git"},"author":{"name":"Kir Belevich","email":"kir@soulshine.in","url":"https://github.com/deepsweet"},"bugs":{"url":"https://github.com/deepsweet/isparta-loader/issues"},"license":"WTFPL","readmeFilename":"README.md","users":{"russomi":true}}