Skip to content

Extract pretty cli to seperate module #132

@mpkorstanje

Description

@mpkorstanje

🤔 What's the problem you're trying to solve?

The code for pretty printing a feature file operates on messages. As such this module doesn't need a dependency on Gherkin per-se. However because the Javascript implementation also includes a CLI, the Gherkin parser as well as several other dependencies are added to make this possible.

These added dependencies make the Gherkin Util module less suitable for being a utilities module.

✨ What's your proposed solution?

Consider extracting the CLI from gherkin-utils to gherkin-cli and that provides

  • gherkin parse <FILE> -> outputs Gherkin document as json.
  • gherkin format <FILE> -> outputs the prettied Gherkin document.

⛏ Have you considered any alternatives or workarounds?

No response

📚 Any additional context?

I created a POC for doing something similar with messages here:

https://github.com/cucumber/messages-cli

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions