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

* Add --coverage option to build script

* Update README
This commit is contained in:
William Assis 2020-09-25 03:12:00 -03:00 committed by GitHub
parent dde5b724e8
commit 8a22111a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -100,6 +100,10 @@ Available options:
This command creates a production-ready build of your plugin.
Available options:
- `--coverage` - Reports code coverage after the test step of the build.
## FAQ
### Which version of grafana-toolkit should I use?

View File

@ -139,8 +139,9 @@ export const run = (includeInternalScripts = false) => {
program
.command('plugin:build')
.description('Prepares plugin dist package')
.option('--coverage', 'Run code coverage', false)
.action(async cmd => {
await execTask(pluginBuildTask)({ coverage: false, silent: true });
await execTask(pluginBuildTask)({ coverage: cmd.coverage, silent: true });
});
program