{"id":13782594,"url":"https://github.com/valotas/karma-parcel","last_synced_at":"2025-08-01T01:11:57.155Z","repository":{"id":33396071,"uuid":"155272604","full_name":"valotas/karma-parcel","owner":"valotas","description":"Karma with Parcel bundler","archived":false,"fork":false,"pushed_at":"2023-01-27T17:33:45.000Z","size":1124,"stargazers_count":6,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T12:06:10.299Z","etag":null,"topics":["karma","parcel"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valotas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-29T19:56:39.000Z","updated_at":"2023-01-13T09:41:37.000Z","dependencies_parsed_at":"2023-02-15T11:31:03.122Z","dependency_job_id":null,"html_url":"https://github.com/valotas/karma-parcel","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/valotas/karma-parcel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valotas%2Fkarma-parcel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valotas%2Fkarma-parcel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valotas%2Fkarma-parcel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valotas%2Fkarma-parcel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valotas","download_url":"https://codeload.github.com/valotas/karma-parcel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valotas%2Fkarma-parcel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268152078,"owners_count":24204043,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["karma","parcel"],"created_at":"2024-08-03T18:01:39.670Z","updated_at":"2025-08-01T01:11:57.087Z","avatar_url":"https://github.com/valotas.png","language":"TypeScript","funding_links":[],"categories":["Integration with other languages, frameworks"],"sub_categories":["Other"],"readme":"# Karma Parcel\n\nUse [parcel v2][parcel] to preprocess [karma][] tests\n\n**Notice:** `v0.7` or newer of this plugin supports `parcel@2` and `karma@6`. If for whatever\nreason you need to make use of `parcel-bundler@1` (or `parcel@1`), please use [`karma-parcel@0.6`](https://www.npmjs.com/package/karma-parcel/v/0.6.1)\n\n## Install\n\nTo get all the needed packages:\n\n```bash\nnpm i karma parcel karma-parcel -D\n```\n\n## Configure:\n\nAdd `parcel` to the frameworks to be used and to the files that should be preprocessed with it:\n\n```js\nmodule.exports = function (config) {\n  config.set({\n    frameworks: [\"mocha\", \"parcel\"],\n\n    // add patterns with all your tests even if they should not\n    // be handled by parcel\n    files: [\n      \"tests/**/*.js\",\n      {\n        // parcel tests should not be watched. Parcel will do the\n        // watching instead\n        pattern: \"parcel/**/*.js\",\n        watched: false,\n        included: false,\n      },\n    ],\n\n    // let karma know which of the test files should be bundled\n    // with parcel\n    preprocessors: {\n      \"parcel/*\": [\"parcel\"],\n    },\n  });\n};\n```\n\n### `parcelConfig`\n\nsome more parcel specific configuration can be passed to the underlying parcel\ninstance via the `parcelConfig` attribute of your karma configuration:\n\n```js\nmodule.exports = function (config) {\n  config.set({\n    // lot of karma configuration\n    parcelConfig: {\n      cacheDir: \"/path/to/cache\", // default: \"./.cache\"\n      detailedReport: true, // default: false,\n      logLevel: \"verbose\",\n    },\n  });\n};\n```\n\n### `karmaParcelWorkspace`\n\nmake use of this in order to define a workspace other than current directory:\n\n```js\nmodule.exports = function (config) {\n  config.set({\n    // ... lot of karma configuration\n    // use /tmp/foo/bar as the workspace\n    karmaParcelWorkspace: path.join(os.tmpdir(), \"foo\", \"bar\"),\n    parcelConfig: { /* the parcel config*/ },\n  });\n};\n```\n\n## Under the hood\n\nParcel will create one bundle with all the files that are preprocessed with\nthe `parcel` preprocessor. The preprocessor will emit an empty file instead of\nthe actual content. The plugin will register a bundle file to karma's\nfileList with `serve: false` in order not to be handled by karma's middleware.\nTo serve the bundled file, parcel's own middleware is registered and used\n\n# Related\n\nThis plugin is heavily inspired by [`karma-browserify`][karma-browserify] and\n[`karma-webpack`][karma-webpack].\n\n[parcel]: https://parceljs.org/\n[karma]: https://karma-runner.github.io\n[karma-browserify]: https://github.com/nikku/karma-browserify\n[karma-webpack]: https://github.com/webpack-contrib/karma-webpack\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalotas%2Fkarma-parcel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalotas%2Fkarma-parcel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalotas%2Fkarma-parcel/lists"}