Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2022-01-25 00:15:04 +0300
committerGitHub <noreply@github.com>2022-01-25 00:15:04 +0300
commitfed704ef22c36ff7e941a713faf5c542c6048b0e (patch)
treecc4e58731ccabc576e396242a48c26768aa64e2c
parentaaf7b27450f75d6b6573bb55c86b8e6457b0d276 (diff)
[Vue] remove @types plugin dir before building to clear old types (#18673)
* remove @types plugin dir before building to clear old types * fix angularjs test, only include CoreHome UMD, others are not needed
-rw-r--r--plugins/CoreVue/Commands/Build.php8
-rw-r--r--tests/angularjs/karma.conf.js2
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/CoreVue/Commands/Build.php b/plugins/CoreVue/Commands/Build.php
index 818bfb6862..af31a8ec5c 100644
--- a/plugins/CoreVue/Commands/Build.php
+++ b/plugins/CoreVue/Commands/Build.php
@@ -115,6 +115,8 @@ class Build extends ConsoleCommand
return 0;
}
+ $this->clearPluginTypes($plugin);
+
$output->writeln("<comment>Building $plugin...</comment>");
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
passthru($command, $returnCode);
@@ -196,6 +198,12 @@ class Build extends ConsoleCommand
Filesystem::unlinkRecursive($path, true);
}
+ private function clearPluginTypes($plugin)
+ {
+ $path = PIWIK_INCLUDE_PATH . '/@types/' . $plugin;
+ Filesystem::unlinkRecursive($path, true);
+ }
+
private function checkNodeJsVersion(OutputInterface $output)
{
$nodeVersion = ltrim(trim(`node -v`), 'v');
diff --git a/tests/angularjs/karma.conf.js b/tests/angularjs/karma.conf.js
index 49e237c51b..ce8bf2501f 100644
--- a/tests/angularjs/karma.conf.js
+++ b/tests/angularjs/karma.conf.js
@@ -37,7 +37,7 @@ module.exports = function(config) {
'piwik.js',
'plugins/AnonymousPiwikUsageMeasurement/javascripts/url.js',
'plugins/AnonymousPiwikUsageMeasurement/javascripts/tracking.js',
- 'plugins/*/vue/dist/*.umd.js',
+ 'plugins/CoreHome/vue/dist/CoreHome.umd.js',
'plugins/*/**/*.spec.js'
],