From 30e8d139fe0ba5d13692cd6e43ff734489ac4298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Tue, 14 Feb 2023 17:48:44 +0100 Subject: [PATCH] Remove unused partials and add some way to automatically detect it (#38004) * Add docs-check-unused-templates in npm commands and workflow * Remove unused partials icons templates --- package.json | 3 ++- site/layouts/partials/icons/bootstrap-logo-solid.svg | 1 - site/layouts/partials/icons/bootstrap.svg | 1 - site/layouts/partials/icons/cloud-fill.svg | 3 --- site/layouts/partials/icons/code.svg | 3 --- site/layouts/partials/icons/collapse.svg | 4 ---- site/layouts/partials/icons/expand.svg | 4 ---- site/layouts/partials/icons/homepage-hero.svg | 1 - site/layouts/partials/icons/list.svg | 3 --- site/layouts/partials/icons/menu.svg | 1 - 10 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 site/layouts/partials/icons/bootstrap-logo-solid.svg delete mode 100644 site/layouts/partials/icons/bootstrap.svg delete mode 100644 site/layouts/partials/icons/cloud-fill.svg delete mode 100644 site/layouts/partials/icons/code.svg delete mode 100644 site/layouts/partials/icons/collapse.svg delete mode 100644 site/layouts/partials/icons/expand.svg delete mode 100644 site/layouts/partials/icons/homepage-hero.svg delete mode 100644 site/layouts/partials/icons/list.svg delete mode 100644 site/layouts/partials/icons/menu.svg diff --git a/package.json b/package.json index f5635bd5b72b..d09e04c9359c 100644 --- a/package.json +++ b/package.json @@ -74,8 +74,9 @@ "js-test-cloud": "cross-env BROWSERSTACK=true npm run js-test-karma", "js-test-jquery": "cross-env JQUERY=true npm run js-test-karma", "lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint lockfile-lint", - "docs": "npm-run-all docs-build docs-lint", + "docs": "npm-run-all docs-build docs-lint docs-check-unused-templates", "docs-build": "hugo --cleanDestinationDir", + "docs-check-unused-templates": "hugo --printUnusedTemplates", "docs-compile": "npm run docs-build", "docs-vnu": "node build/vnu-jar.js", "docs-lint": "npm run docs-vnu", diff --git a/site/layouts/partials/icons/bootstrap-logo-solid.svg b/site/layouts/partials/icons/bootstrap-logo-solid.svg deleted file mode 100644 index 59bed369b51e..000000000000 --- a/site/layouts/partials/icons/bootstrap-logo-solid.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} diff --git a/site/layouts/partials/icons/bootstrap.svg b/site/layouts/partials/icons/bootstrap.svg deleted file mode 100644 index 1b57d335e018..000000000000 --- a/site/layouts/partials/icons/bootstrap.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} \ No newline at end of file diff --git a/site/layouts/partials/icons/cloud-fill.svg b/site/layouts/partials/icons/cloud-fill.svg deleted file mode 100644 index 4ca9276eb1cd..000000000000 --- a/site/layouts/partials/icons/cloud-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/site/layouts/partials/icons/code.svg b/site/layouts/partials/icons/code.svg deleted file mode 100644 index 73156851aaf6..000000000000 --- a/site/layouts/partials/icons/code.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/site/layouts/partials/icons/collapse.svg b/site/layouts/partials/icons/collapse.svg deleted file mode 100644 index ede702d688b0..000000000000 --- a/site/layouts/partials/icons/collapse.svg +++ /dev/null @@ -1,4 +0,0 @@ - - {{ with .title }}{{ . }}{{ else }}Collapse{{ end }} - - diff --git a/site/layouts/partials/icons/expand.svg b/site/layouts/partials/icons/expand.svg deleted file mode 100644 index d143151759f9..000000000000 --- a/site/layouts/partials/icons/expand.svg +++ /dev/null @@ -1,4 +0,0 @@ - - {{ with .title }}{{ . }}{{ else }}Expand{{ end }} - - diff --git a/site/layouts/partials/icons/homepage-hero.svg b/site/layouts/partials/icons/homepage-hero.svg deleted file mode 100644 index 538045ad9a28..000000000000 --- a/site/layouts/partials/icons/homepage-hero.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} \ No newline at end of file diff --git a/site/layouts/partials/icons/list.svg b/site/layouts/partials/icons/list.svg deleted file mode 100644 index a801c226233e..000000000000 --- a/site/layouts/partials/icons/list.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/site/layouts/partials/icons/menu.svg b/site/layouts/partials/icons/menu.svg deleted file mode 100644 index 70eaccec725d..000000000000 --- a/site/layouts/partials/icons/menu.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}Menu{{ end }} \ No newline at end of file