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 08:12:00 +02:00
committed by GitHub
parent dde5b724e8
commit 8a22111a8e
2 changed files with 6 additions and 1 deletions
+4
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?
+2 -1
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