Przejdź do głównej zawartości

Zarządzanie nagłówkami

Nagłówek praw autorskich

Skrypt automatycznie dodaje nagłówki do TypeScript/JavaScript w frontend/src i backend/src dla .ts, .tsx, .js, .jsx:

/*
* Libre WebUI
* Copyright (C) 2025 Kroonen AI, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Użycie

Automatycznie

npm run format

Uruchamia skrypt i Prettier.

Ręcznie

npm run add-headers

Wykrywanie

Dodaje brakujące, pomija istniejące, konfiguracje, buildy i zależności; tylko pliki źródłowe.

Ignorowane pliki i katalogi

node_modules/, dist/, build/, coverage/, public/, *.config.js, *.config.ts, vite-env.d.ts, eslint.config.js.

Implementacja

/scripts/add-headers.js, zintegrowany w package.json.