{"id":18764469,"url":"https://github.com/theintern/istanbul-loader","last_synced_at":"2025-04-13T04:33:33.794Z","repository":{"id":25257516,"uuid":"103574360","full_name":"theintern/istanbul-loader","owner":"theintern","description":"A code coverage-instrumenting webpack loader","archived":false,"fork":false,"pushed_at":"2023-03-04T02:33:47.000Z","size":888,"stargazers_count":2,"open_issues_count":9,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T22:04:59.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theintern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-14T19:42:37.000Z","updated_at":"2024-10-23T19:54:16.000Z","dependencies_parsed_at":"2024-06-21T13:06:25.102Z","dependency_job_id":"b75e63cf-a6eb-4376-8c6e-9eccd4cb232e","html_url":"https://github.com/theintern/istanbul-loader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theintern%2Fistanbul-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theintern%2Fistanbul-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theintern%2Fistanbul-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theintern%2Fistanbul-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theintern","download_url":"https://codeload.github.com/theintern/istanbul-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248664709,"owners_count":21142016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:29:56.546Z","updated_at":"2025-04-13T04:33:33.532Z","avatar_url":"https://github.com/theintern.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# istanbul-loader\n\nThis is a webpack loader that uses\n[istanbul-lib-instrument](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-lib-instrument)\nto add code coverage instrumentation to JavaScript files.\n\n## Installation\n\nInstall with\n\n```\nnpm install @theintern/istanbul-loader --save-dev\n```\n\n## Usage\n\nInstall the loader in a project and add an entry for it to the project's\nwebpack.config:\n\n```js\nmodule: {\n    rules: [\n        {\n            test: /src\\/.*\\.ts$/,\n            use: '@theintern/istanbul-loader'\n        },\n\t\t...\n    ]\n}\n```\n\nNote that the istanbul-loader should be run _after_ transpilers such as\nTypeScript. This means that it should come _before_ transpilers in a loader\nlist, or use `enforce: 'post'`:\n\n```js\nrules: [\n    {\n\t    test: /src\\/.(\\.ts$/,\n\t\tuse: [ '@theintern/istanbul-loader', 'ts-node' ]\n\t},\n\t...\n]\n```\n\nor\n\n```js\nrules: [\n    {\n\t    test: /src\\/.(\\.ts$/,\n\t\tuse: '@theintern/istanbul-loader',\n\t\tenforce: 'post'\n\t},\n\t...\n]\n```\n\n## Configuration\n\nThe rule test should only match source files, not all `.ts` or `.js` files, so\nas not to instrument tests or support files.\n\nOptions can be passed using the standard webpack `options` property:\n\n```js\nrules: [\n    {\n\t    test: /src\\/.(\\.ts$/,\n\t\tuse: {\n\t\t\tloader: '@theintern/istanbul-loader',\n\t\t\toptions: { config: 'tests/intern.json' }\n\t\t}\n\t},\n\t...\n]\n```\n\nCurrently the only option used by the loader is 'config', which should point to\nan\n[Intern config file](https://github.com/theintern/intern/blob/master/docs/configuration.md#config-file).\nThe loader will use values for `coverageVariable` and `instrumenterOptions`\nfrom the Intern config, if present.\n\n## License\n\nIntern is a [JS Foundation](https://js.foundationn) project offered under the\n[New BSD](LICENSE) license.\n\n© [SitePen, Inc.](http://sitepen.com) and its [contributors](https://github.com/theintern/intern/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheintern%2Fistanbul-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheintern%2Fistanbul-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheintern%2Fistanbul-loader/lists"}