build: include license for source maps during build

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
This commit is contained in:
Grigorii K. Shartsev 2024-08-12 22:29:03 +02:00
Родитель 7efac71be5
Коммит a98339bc6e
3 изменённых файлов: 1 добавлений и 25 удалений

Просмотреть файл

@ -1,24 +0,0 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
set -e
# Add licenses for source maps
if [ -d "js" ]; then
for f in js/*.js; do
# If license file and source map exists copy license for the source map
if [ -f "$f.license" ] && [ -f "$f.map" ]; then
# Remove existing link
[ -e "$f.map.license" ] || [ -L "$f.map.license" ] && rm "$f.map.license"
# Create a new link
ln -s "$(basename "$f.license")" "$f.map.license"
fi
done
echo "Copying licenses for sourcemaps done"
else
echo "This script needs to be executed from the root of the repository"
exit 1
fi

Просмотреть файл

@ -7,7 +7,6 @@
"private": true,
"scripts": {
"build": "vite build",
"postbuild": "build-js/npm-post-build.sh",
"dev": "vite build --mode development",
"watch": "vite build --mode development --watch",
"lint": "eslint --ext .js,.vue src",

Просмотреть файл

@ -20,5 +20,6 @@ export default createAppConfig({
overwriteLicenses: {
'@nextcloud/axios': 'GPL-3.0-or-later',
},
includeSourceMaps: true,
},
})