-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
gatsby-cli: Consider exposing Reporter For Use By Starters and Plugins #3145
Comments
the reporter is exposed to plugins via the plugin api (https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/api-runner-node.js#L76) I think this is probably safer than everyone requiring a singleton package. especially if we want to tweak or change how this is handled (or make them pluggable) |
That's great. I'd missed that and it's definitely useful for plugins, however, it would be nice to have access to it in I'm working on a starter that has a simple user-facing config that exposes some of the plugin options in a way that's easy to tweak (and allows the user-facing config to be validated). This means I build It just seems silly to have to use a separate logger in these instances which I think are equally valid uses. Another use would be in functional helpers, like the one that handles pagination. |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
Using the reporter is a nice way to keep logging consistent, but it isn't exposed by
gatsby-cli
. I think it is worth exposing it or moving it to a separate consumable package.It can be used by reaching in to lib:
const reporter = require('gatsby-cli/lib/reporter');
which is fragile.The text was updated successfully, but these errors were encountered: