Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing custom formatters #992

Closed
kbrandwijk opened this issue Dec 31, 2017 · 4 comments
Closed

Sharing custom formatters #992

kbrandwijk opened this issue Dec 31, 2017 · 4 comments

Comments

@kbrandwijk
Copy link

kbrandwijk commented Dec 31, 2017

I have built a custom formatter (for TAP output), and now I want to share this formatter. However, I can only specify a file name for a custom formatter. That means I need to point to node_modules/[myformatter]/dist/tap-formatter.js, which is not really nice.

Do you have any plans to support pointing to a package? For example by extending the cucumber.js configuration file, so I can put something in there like:

{
  "formatters": {
    "tap": "my-package-name"
  }
}

So I can use -f tap.

@charlierudolph
Copy link
Member

If [myformatter] has "main": "dist/tap-formatter.js" in its package.json then you would be able to do -f node_modules/[myformatter].

We could still create this formatter alias block so it can be applied with a nicer name, but the user shouldn't need to specify the path within the node module in most cases

@kbrandwijk
Copy link
Author

@charlierudolph That's a proper intermediate solution. Thanks.

@charlierudolph
Copy link
Member

Closing and will add a comment to #751

@lock
Copy link

lock bot commented Jan 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants