Elderjs / plugins

Elder.js plugins and community plugins.
https://elderguide.com/tech/elderjs/
MIT License
80 stars 20 forks source link

[Seo-check]: add ability to disable it during dev mode and generate a full report at build time #90

Closed kiuKisas closed 3 years ago

kiuKisas commented 3 years ago

In my company, as I don't manage the content of the site, I don't need to be warn about most of the seo-check. It could be more handy to have a final report during build time. What I actually think of for my use case is to send a report to a slack channel at every build.

nickreese commented 3 years ago

Agreed on both points. Working on those next. Main issue is that builds split request generation between processes and plugins don’t have a shared closure there. Will probably end up globbing the public html.

nickreese commented 3 years ago

@kiuKisas Build mode is done. You could do a NODE_ENV=production check in your elder.config.js to turn the plugin on/off. Or we can add a flag.

nickreese commented 3 years ago

Try:

  '@elderjs/plugin-seo-check': {
    display: process.NODE_ENV === 'production' ? ['errors', 'warnings']: [], // disables reporting unless you in production building.
    },
kiuKisas commented 3 years ago

That was fast, thank's :+1:
I'll give a try today