{"id":18459186,"url":"https://github.com/smartbear/react-gherkin-editor","last_synced_at":"2025-04-08T05:35:01.067Z","repository":{"id":36964220,"uuid":"179066296","full_name":"SmartBear/react-gherkin-editor","owner":"SmartBear","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-12T06:28:57.000Z","size":6280,"stargazers_count":8,"open_issues_count":23,"forks_count":6,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-12T14:34:15.101Z","etag":null,"topics":["cucumber-for-jira","open-source"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/SmartBear.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}},"created_at":"2019-04-02T11:47:19.000Z","updated_at":"2024-04-15T07:45:51.071Z","dependencies_parsed_at":"2023-09-27T12:36:08.381Z","dependency_job_id":"7218999f-e984-4c1a-8f49-5a0a54d2d399","html_url":"https://github.com/SmartBear/react-gherkin-editor","commit_stats":{"total_commits":1184,"total_committers":21,"mean_commits":56.38095238095238,"dds":"0.23817567567567566","last_synced_commit":"13e5414610459a7489141e00c8f3fe67af036abc"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Freact-gherkin-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Freact-gherkin-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Freact-gherkin-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Freact-gherkin-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmartBear","download_url":"https://codeload.github.com/SmartBear/react-gherkin-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785918,"owners_count":20995641,"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":["cucumber-for-jira","open-source"],"created_at":"2024-11-06T08:22:11.039Z","updated_at":"2025-04-08T05:34:56.058Z","avatar_url":"https://github.com/SmartBear.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Gherkin Editor\n\nA Gherkin language editor for React.\n\n[![Version][version-badge]][package]\n[![CI][ci-badge]][ci]\n[![Dependencies][dependencies-badge]][dependencies]\n[![License][license-badge]][license]\n\n## Introduction\n\nReact Gherkin Editor is a wrapper arround [React Ace Editor](https://github.com/securingsincity/react-ace) specially designed for Gherkin.\n\nFeatures:\n\n- Gherkin syntax highlighting\n- Gherkin keyword snippets\n- Easy to provide step autocompletions (Promise based)\n- Gherkin I18n support\n- Special themes for Jira and Cucumber\n\n## Installation\n\nUsing npm:\n\n```\nnpm install --save @smartbear/react-gherkin-editor\n```\n\nUsing yarn:\n\n```\nyarn add @smartbear/react-gherkin-editor\n```\n\n## Basic Usage\n\n```javascript\nimport React from 'react'\nimport { render } from 'react-dom'\nimport ReactGherkinEditor from '@smartbear/react-gherkin-editor'\n\nconst root = document.createElement('div')\ndocument.body.appendChild(root)\n\nconst initialValue = `Feature: Serve coffee\n  As a coffee lover\n  I can get coffee from the machine\n  So I can enjoy the rest of the day\n\n  Scenario: Simple use\n    # Well, sometimes, you just get a coffee.\n    Given the coffee machine is started\n    When I take a coffee\n    Then coffee should be served\n    And message \"Please take your coffee\" should be printed`\n\nconst steps = [\n  'I start the coffee machine using language \"lang\"',\n  'I shutdown the coffee machine',\n  'message \"message\" should be displayed'\n]\n\nconst onValueChange = console.log\n\nconst autoCompleteFunction = async (_keyword, text) =\u003e {\n  const matches = steps.filter(step =\u003e step.startsWith(text))\n\n  const completions = matches.map(match =\u003e ({\n    caption: match,\n    value: match,\n    score: Math.floor(Math.random() * Math.floor(100)),\n    meta: 'Step'\n  }))\n\n  return completions\n}\n\nrender(\n  \u003cReactGherkinEditor\n    initialValue={initialValue}\n    onChange={onValueChange}\n    autoCompleteFunction={autoCompleteFunction}\n    language='en'\n    theme='cucumber'\n  /\u003e,\n  root\n)\n```\n\n## Ace Documentation\n\n[React Ace Editor](https://github.com/securingsincity/react-ace)\n\n[version-badge]: https://img.shields.io/npm/v/@smartbear/react-gherkin-editor\n[package]: https://www.npmjs.com/package/@smartbear/react-gherkin-editor\n[ci-badge]: https://img.shields.io/github/workflow/status/smartbear/react-gherkin-editor/CI?logo=github\n[ci]: https://github.com/SmartBear/react-gherkin-editor/actions?query=workflow%3ACI\n[dependencies-badge]: https://img.shields.io/david/smartbear/react-gherkin-editor\n[dependencies]: https://david-dm.org/smartbear/react-gherkin-editor\n[license-badge]: https://img.shields.io/npm/l/@smartbear/react-gherkin-editor\n[license]: https://github.com/SmartBear/react-gherkin-editor/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartbear%2Freact-gherkin-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartbear%2Freact-gherkin-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartbear%2Freact-gherkin-editor/lists"}