From 953ce043c416645bbb36bb83ab9dfffe91eed04d Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 1 Sep 2023 15:41:13 +0200 Subject: [PATCH 1/2] Move licenses.txt to /assets root --- templates/base/footer_content.tmpl | 2 +- webpack.config.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index 3b87f25d63786..cf647f1cc60ef 100644 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -23,7 +23,7 @@ {{end}} - {{.locale.Tr "licenses"}} + {{.locale.Tr "licenses"}} {{if .EnableSwagger}}API{{end}} {{template "custom/extra_links_footer" .}} diff --git a/webpack.config.js b/webpack.config.js index 95749611162eb..d6d46b5c5378d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -188,7 +188,7 @@ export default { filename: 'js/monaco-[name].[contenthash:8].worker.js', }), isProduction ? new LicenseCheckerWebpackPlugin({ - outputFilename: 'js/licenses.txt', + outputFilename: 'licenses.txt', outputWriter: ({dependencies}) => { const line = '-'.repeat(80); const goJson = readFileSync('assets/go-licenses.json', 'utf8'); @@ -211,7 +211,7 @@ export default { }, emitError: true, allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0 OR Unlicense OR EPL-1.0 OR EPL-2.0)', - }) : new AddAssetPlugin('js/licenses.txt', `Licenses are disabled during development`), + }) : new AddAssetPlugin('licenses.txt', `Licenses are disabled during development`), ], performance: { hints: false, @@ -239,7 +239,7 @@ export default { entrypoints: false, excludeAssets: [ /^js\/monaco-language-.+\.js$/, - !isProduction && /^js\/licenses.txt$/, + !isProduction && /^licenses.txt$/, ].filter(Boolean), groupAssetsByChunk: false, groupAssetsByEmitStatus: false, From 31e469c2850be3ef114e530556a676a63a8f9a55 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 1 Sep 2023 15:47:03 +0200 Subject: [PATCH 2/2] add gitignore entry --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6b699e08700f3..e3b9c3c43eb39 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,7 @@ cpu.out /public/assets/js /public/assets/css /public/assets/fonts +/public/assets/licenses.txt /public/assets/img/webpack /vendor /web_src/fomantic/node_modules