Commit 8a22111a by William Assis Committed by GitHub

Toolkit: Add --coverage flag to plugin build command (#27743)

* Add --coverage option to build script

* Update README
parent dde5b724
...@@ -100,6 +100,10 @@ Available options: ...@@ -100,6 +100,10 @@ Available options:
This command creates a production-ready build of your plugin. This command creates a production-ready build of your plugin.
Available options:
- `--coverage` - Reports code coverage after the test step of the build.
## FAQ ## FAQ
### Which version of grafana-toolkit should I use? ### Which version of grafana-toolkit should I use?
......
...@@ -139,8 +139,9 @@ export const run = (includeInternalScripts = false) => { ...@@ -139,8 +139,9 @@ export const run = (includeInternalScripts = false) => {
program program
.command('plugin:build') .command('plugin:build')
.description('Prepares plugin dist package') .description('Prepares plugin dist package')
.option('--coverage', 'Run code coverage', false)
.action(async cmd => { .action(async cmd => {
await execTask(pluginBuildTask)({ coverage: false, silent: true }); await execTask(pluginBuildTask)({ coverage: cmd.coverage, silent: true });
}); });
program program
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment