-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add copyright notice to multiple files
- Loading branch information
1 parent
1155c17
commit 5e6af81
Showing
22 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ | |
"electron:publish": "npm run build:prod && electron-builder build --publish=never", | ||
"electron:mac": "npm run build:prod && electron-builder build --mac -p always", | ||
"lint": "ng lint", | ||
"updateElectron": "npx cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://proxypac.si.francetelecom.fr:8080/ yarn add [email protected] --force --legacy-peer-deps", | ||
"addHeader": "ts-node scripts/add-header.js", | ||
"updateVersions": "ncu -u --target minor" | ||
}, | ||
"dependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Chemin du projet Angular | ||
const projectDir = './src'; | ||
|
||
// Header à ajouter | ||
const headerComment = `/* | ||
* Copyright (c) 2023-2025 Orange. All rights reserved. | ||
* This software is distributed under the BSD 3-Clause-clear License, the text of which is available | ||
* at https://spdx.org/licenses/BSD-3-Clause-Clear.html or see the "LICENSE" file for more details. | ||
*/ | ||
`; | ||
|
||
function addHeaderToFile(filePath) { | ||
const fileContent = fs.readFileSync(filePath, 'utf8'); | ||
if (!fileContent.startsWith('/**')) { | ||
const newContent = headerComment + fileContent; | ||
fs.writeFileSync(filePath, newContent, 'utf8'); | ||
console.log(`Header ajouté à : ${filePath}`); | ||
} else { | ||
console.log(`Header déjà présent dans : ${filePath}`); | ||
} | ||
} | ||
|
||
function traverseDirectory(directory) { | ||
fs.readdirSync(directory).forEach((file) => { | ||
const fullPath = path.join(directory, file); | ||
if (fs.statSync(fullPath).isDirectory()) { | ||
traverseDirectory(fullPath); | ||
} else if (fullPath.endsWith('.js') || fullPath.endsWith('.ts')) { | ||
addHeaderToFile(fullPath); | ||
} | ||
}); | ||
} | ||
|
||
traverseDirectory(projectDir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
/* | ||
* Copyright (c) 2023-2025 Orange. All rights reserved. | ||
* This software is distributed under the BSD 3-Clause-clear License, the text of which is available | ||
* at https://spdx.org/licenses/BSD-3-Clause-Clear.html or see the "LICENSE" file for more details. | ||
*/ | ||
|
||
import 'zone.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters