{"id":23069719,"url":"https://github.com/gherking/gpc-remove-comments","last_synced_at":"2026-04-29T17:33:59.743Z","repository":{"id":43156301,"uuid":"466181900","full_name":"gherking/gpc-remove-comments","owner":"gherking","description":"This precompiler removes all or particular type of semantic comments from the feature file.","archived":false,"fork":false,"pushed_at":"2026-03-21T04:52:05.000Z","size":1056,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-21T20:40:33.184Z","etag":null,"topics":["cucumber","feature-file","gherkin","gherking","gpc","hacktoberfest","precompiler","typescript"],"latest_commit_sha":null,"homepage":"https://gherking.github.io/gpc-remove-comments/","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/gherking.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-04T15:51:27.000Z","updated_at":"2026-03-21T04:52:10.000Z","dependencies_parsed_at":"2023-02-08T10:31:30.734Z","dependency_job_id":"6e04fbcb-98df-4293-b2f4-160fca1c5707","html_url":"https://github.com/gherking/gpc-remove-comments","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.33333333333333337","last_synced_commit":"15f8c625dd02c793d5f248f4bd8bcf48aea0a913"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"gherking/gpc-template","purl":"pkg:github/gherking/gpc-remove-comments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-remove-comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-remove-comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-remove-comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-remove-comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gherking","download_url":"https://codeload.github.com/gherking/gpc-remove-comments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-remove-comments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32436908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T17:26:39.753Z","status":"ssl_error","status_checked_at":"2026-04-29T17:25:53.857Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cucumber","feature-file","gherkin","gherking","gpc","hacktoberfest","precompiler","typescript"],"created_at":"2024-12-16T06:16:47.061Z","updated_at":"2026-04-29T17:33:59.700Z","avatar_url":"https://github.com/gherking.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpc-remove-comments\n\n![Downloads](https://img.shields.io/npm/dw/gpc-remove-comments?style=flat-square) ![Version@npm](https://img.shields.io/npm/v/gpc-remove-comments?label=version%40npm\u0026style=flat-square) ![Version@git](https://img.shields.io/github/package-json/v/gherking/gpc-remove-comments/master?label=version%40git\u0026style=flat-square) ![CI](https://img.shields.io/github/workflow/status/gherking/gpc-remove-comments/CI/master?label=ci\u0026style=flat-square) ![Docs](https://img.shields.io/github/workflow/status/gherking/gpc-remove-comments/Docs/master?label=docs\u0026style=flat-square)\n\nThis precompiler removes all or particular type of semantic comments from the feature file.\n\n## Usage\n\n```javascript\n'use strict';\nconst compiler = require('gherking');\nconst { default: RemoveComments, CommentType } = require('gpc-remove-comments');\n\nlet ast = await compiler.load('./features/src/login.feature');\nast = compiler.process(\n  ast,\n  new RemoveComments({\n    keep: CommentType.STEP | CommentType.PRECEDING\n  })\n);\nawait compiler.save('./features/dist/login.feature', ast, {\n  lineBreak: '\\r\\n'\n});\n```\n\n```typescript\n'use strict';\nimport {load, process, save} from \"gherking\";\nimport RemoveComments, { CommentType } from \"gpc-remove-comments\";\n\nlet ast = await load(\"./features/src/login.feature\");\nast = process(\n  ast,\n  new RemoveComments({\n    keep: CommentType.STEP | CommentType.PRECEDING\n  })\n);\nawait save('./features/dist/login.feature', ast, {\n  lineBreak: '\\r\\n'\n});\n```\n\n### Configuration\n\nBy default, the precompiler removes all comments. But to keep certain [type of comments](https://github.com/gherking/gherkin-ast#comments), the `keep` configuration options\nand the [CommentType](src/types.ts) flags can be used.\n\n- To keep all comments, pass the `CommentType.ALL` in `keep`\n- To keep none of the comments, pass the `CommentType.NONE` in `keep` (this is the default)\n- To keep any or more types, pass the value using the **binary OR**: `CommentType.STEP | CommentType.TAG`\n\n#### `.gherking.json`\n\nWhen the configuration is set in the `.gherking.json`, the names of the `CommentType` can be used and passed as a **string array**, e.g.\n\n```json\n{\n  \"compilers\": [\n    {\n      \"path\": \"gpc-remove-comments\",\n      \"configuration\": {\n        \"keep\": [\"STEP\", \"TAG\"]\n      }\n    }\n  ]\n}\n```\n\n## Other\n\nThis package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:remove-comments` :\n\n```shell\nDEBUG=gpc:remove-comments* gherking ...\n```\n\nFor detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-remove-comments/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgherking%2Fgpc-remove-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgherking%2Fgpc-remove-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgherking%2Fgpc-remove-comments/lists"}