Removed old PHP code, migrated to Python and Flask

Update .dockerignore, .env, and 503 more files...
This commit is contained in:
2024-10-20 16:20:37 +02:00
parent 169e4b4fe0
commit a930331d6c
394 changed files with 4705 additions and 190131 deletions

View File

@@ -1,26 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the project's root directory
cd /D "%~dp0\..\"
:clean
echo.
echo Cleaning up the project
echo -----------------------
:clean-php-minified
echo Clearing old minified PHP files...
pushd %CD%
for /r "%CD%" %%F in (*.min.php) do (
echo ^> Deleting "%%F"
del "%%F"
)
echo ^> Done ^!
popd
:clean-end
:end

View File

@@ -1,24 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:content
echo.
echo Handling the raw content files
echo ------------------------------
:content-compile-index
echo Compiling index files...
python content_index_maker.py ../content/raw_index/ ../content/index.json
:content-compile-items
echo Compiling content item files...
python content_item_converter.py ../content/raw_items/ ../content/items/
:content-end
:end

View File

@@ -1,44 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:js-external
echo.
echo Handling external libraries
echo ---------------------------
:js-external-decimaljs-minify
echo Minifying Decimal.JS
pushd %CD%
cd %~dp0\..\resources\DecimalJs\10.4.3\
echo ^> resources\DecimalJs\10.4.3\decimal.mjs
call "%~dp0node_modules\.bin\terser" decimal.mjs -c -m --toplevel -o decimal.min.mjs
cd %~dp0\..\resources\DecimalJsLight\2.5.1\
echo ^> resources\DecimalJsLight\2.5.1\decimal.mjs
call "%~dp0node_modules\.bin\terser" decimal.mjs -c -m --toplevel -o decimal.min.mjs
popd
:js-external-highlightjs
echo Handling HighlightJS
pushd %CD%
cd %~dp0\..\resources\HighlightJS\
echo ^> Clearing old files
del /Q /S /F highlight.js 2> nul 1> nul
del /Q /S /F highlight.min.js 2> nul 1> nul
echo ^> Installing dependencies
call npm install > nul
echo ^> Building for browsers
node tools/build.js -t browser sql php c cpp vbnet java yaml css scss bash ini python shell dockerfile cmake purebasic csharp 1> nul
echo ^> Moving final files
robocopy %CD%\build %CD% highlight.js highlight.min.js 1> nul
echo ^> Minifying used CSS files
call "%~dp0node_modules\.bin\sass" src/styles/atom-one-dark.css:src/styles/atom-one-dark.min.css -q --style compressed
popd
:js-external-end
:end

View File

@@ -13,20 +13,38 @@ echo --------------------------------
:js-nibblepoker-minify
echo Minifying nibblepoker.js
pushd %CD%
cd %~dp0\..\resources\NibblePoker\js\
echo ^> resources\NibblePoker\js\nibblepoker.js
cd %~dp0\..\static\resources\NibblePoker\js\
echo ^> static\resources\NibblePoker\js\nibblepoker.js
call "%~dp0node_modules\.bin\rollup" nibblepoker.mjs --file nibblepoker.js
call "%~dp0node_modules\.bin\terser" nibblepoker.js -c -m -o nibblepoker.min.js
echo ^> resources\NibblePoker\js\nibblepoker-code.js
echo ^> static\resources\NibblePoker\js\nibblepoker-code.js
call "%~dp0node_modules\.bin\terser" nibblepoker-code.js -c -m -o nibblepoker-code.min.js
echo ^> resources\NibblePoker\js\nibblepoker-contributors.js
echo ^> static\resources\NibblePoker\js\nibblepoker-contributors.js
call "%~dp0node_modules\.bin\terser" nibblepoker-contributors.js -c -m -o nibblepoker-contributors.min.js
echo ^> resources\NibblePoker\js\nibblepoker-debug.js
echo ^> static\resources\NibblePoker\js\nibblepoker-debug.js
call "%~dp0node_modules\.bin\terser" nibblepoker-debug.js -c -m -o nibblepoker-debug.min.js
echo ^> resources\NibblePoker\js\nibblepoker-splide.js
echo ^> static\resources\NibblePoker\js\nibblepoker-splide.js
call "%~dp0node_modules\.bin\terser" nibblepoker-splide.js -c -m -o nibblepoker-splide.min.js
popd
:js-svgtopng-minify
echo Minifying SVG-to-PNG
pushd %CD%
cd %~dp0\..\static\resources\NibblePoker\tools\svg-to-png\
echo ^> static\resources\NibblePoker\tools\svg-to-png\svg-to-png.mjs
call "%~dp0node_modules\.bin\rollup" svg-to-png.mjs --file svg-to-png.js
call "%~dp0node_modules\.bin\terser" svg-to-png.js -c -m -o svg-to-png.min.js
popd
:js-uuidgenerator-minify
echo Minifying UUID Generator
pushd %CD%
cd %~dp0\..\static\resources\NibblePoker\tools\uuid-generator\
echo ^> static\resources\NibblePoker\tools\svg-to-png\svg-to-png.mjs
call "%~dp0node_modules\.bin\rollup" uuid-generator.mjs --file uuid-generator.js
call "%~dp0node_modules\.bin\terser" uuid-generator.js -c -m -o uuid-generator.min.js
popd
:js-nibblepoker-end
:end

View File

@@ -1,28 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:sass
echo.
echo Handling the SASS files
echo -----------------------
:sass-compile
echo Compiling SASS files...
pushd %CD%
cd %~dp0\..\resources\NibblePoker\scss\
call "%~dp0node_modules\.bin\sass" nibblepoker.scss:../css/nibblepoker.css -q
call "%~dp0node_modules\.bin\sass" nibblepoker.scss:../css/nibblepoker.min.css -q --style compressed
call "%~dp0node_modules\.bin\sass" snowflakes.scss:../css/snowflakes.css -q
call "%~dp0node_modules\.bin\sass" snowflakes.scss:../css/snowflakes.min.css -q --style compressed
call "%~dp0node_modules\.bin\sass" debugger.scss:../css/debugger.css -q
call "%~dp0node_modules\.bin\sass" debugger.scss:../css/debugger.min.css -q --style compressed
popd
:sass-end
:end

View File

@@ -1,20 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:lang
echo.
echo Handling the languages
echo ----------------------
:lang-compile
echo Compiling lang files...
python compile_strings.py ../commons/strings/ ../commons/strings.json
:lang-end
:end

View File

@@ -1,15 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:: Running sub-scripts
call "%~dp0compile-clean.cmd"
call "%~dp0compile-strings.cmd"
call "%~dp0compile-content.cmd"
call "%~dp0compile-sass.cmd"
call "%~dp0compile-js-site.cmd"
call "%~dp0compile-js-external.cmd"
:end

View File

@@ -1,84 +0,0 @@
#!/bin/python
import argparse
from datetime import datetime
import json
import os
import sys
# Including nicer-looking print function if possible.
try:
from rich import print
except ImportError:
pass
# Preparing and parsing launch arguments
parser = argparse.ArgumentParser()
parser.add_argument("input", help="Input folder where the strings are located.")
parser.add_argument("output", help="Output file where the compiled strings will be saved.")
# Fixing some issues with "argparse"
def argparse_error(message):
raise argparse.ArgumentError(None, message)
# Parsing launch options
parser.error = argparse_error
try:
args = parser.parse_args()
except argparse.ArgumentError as err:
print(f"\033[31m\033[1mError:\033[0m\033[31m {err.message.capitalize()}\033[39m")
print("\033[36m\033[1mUsage:\033[0m\033[36m compile_strings.py <input_folder> <output_file>\033[39m")
sys.exit(1)
# Checking the given options are valid
if not (os.path.exists(args.input) and os.path.isdir(args.input)):
print(f"\033[31m\033[1mError:\033[0m\033[31m The given input directory '{args.input}' doesn't exist or is a file !\033[39m")
sys.exit(2)
if os.path.isdir(args.output):
print(f"\033[31m\033[1mError:\033[0m\033[31m The given output '{args.output}' is a directory !\033[39m")
sys.exit(3)
# Starting the process
print(f"Compiling '{args.input}' to '{args.output}'...")
input_folder = os.path.abspath(args.input)
output_file = os.path.abspath(args.output)
lang_data = dict()
lang_data["_compile_date"] = datetime.utcnow().isoformat() + "Z"
for main_dir_entry in os.listdir(input_folder):
if main_dir_entry.startswith("_"):
continue
print("> Processing '{}'".format(main_dir_entry))
if not os.path.isdir(os.path.join(input_folder, main_dir_entry)):
continue
lang_data[main_dir_entry] = dict()
for sub_dir_entry in os.listdir(os.path.join(input_folder, main_dir_entry)):
print("-> Checking '{}/{}'".format(main_dir_entry, sub_dir_entry))
if not sub_dir_entry.endswith(".json"):
continue
with open(os.path.join(input_folder, main_dir_entry, sub_dir_entry), "rb") as f:
input_lang_data: dict = json.loads(f.read().decode("utf-8"))
for lang_record_key in input_lang_data.keys():
lang_record_key: str
if lang_record_key.startswith("_"):
continue
lang_data[main_dir_entry][lang_record_key] = input_lang_data[lang_record_key]
try:
os.remove(output_file)
except IOError:
pass
with open(output_file, "wb") as f:
f.write(json.dumps(lang_data, separators=(',', ':')).encode("utf-8"))

View File

@@ -1,87 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:compile
call "%~dp0compile.cmd"
:compile-path-fix
:: Going into the project's root directory
cd /D "%~dp0\..\"
:compile-end
:archive
echo.
echo Preparing a deployment archive
echo ------------------------------
:archive-env-name
echo Preparing name variable...
set NP_ZIP_NAME=build_%date:~-4%-%date:~3,2%-%date:~0,2%.7z
del /Q /S /F %NP_ZIP_NAME% 2> nul 1> nul
echo ^> %NP_ZIP_NAME%
:archive-env-content
echo Preparing environment variable...
set NP_ZIP_CONTENT=
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "about/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "commons/*.php"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "commons/strings.json"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "commons/DOM/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "commons/content/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "contact/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "content/*.*"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "content/items/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "contributors/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "debug/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "links/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "privacy/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*/*/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*/*/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*/*/*/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/ExtGraphics/*/*/*/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/FontAwesomePro/5.15.3/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/FontAwesomePro/6.5.1/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/HighlightJS/highlight.min.js" "resources/HighlightJS/src/styles/atom-one-dark.min.css"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/css/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.jpg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.jpeg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.webp"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*.jpg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*.jpeg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*.webp"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*/*.png"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*/*.jpg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*/*.jpeg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*/*.svg"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*/*/*.webp"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/js/*.js"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/sounds/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/Quantum/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/SplideJs/dist/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "tools/*"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "tools/items/*.json"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "tools/items/*/*"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "./.htaccess" "./*.php" "./favicon.*" "./.env"
::echo ^>%NP_ZIP_CONTENT%
:archive-7z
echo Making '.7z' archive...
7z a -mx9 "./%NP_ZIP_NAME%" %NP_ZIP_CONTENT% 1> nul
echo ^> Done !
:archive-end
echo You can use the following command on the server:
echo ^> 7z x %NP_ZIP_NAME% ^&^& chmod 755 -R ./ ^&^& rm %NP_ZIP_NAME%
:end

View File

@@ -1,102 +0,0 @@
#!/bin/python
import argparse
import json
import os
import sys
# Importing YAML parser safely
try:
import yaml
except ImportError:
print("You need to install the 'PyYAML' module to continue !")
sys.exit(10)
# Including nicer-looking print function if possible.
try:
from rich import print
except ImportError:
pass
# Preparing and parsing launch arguments
parser = argparse.ArgumentParser()
parser.add_argument("input", help="Input folder where the strings are located.")
parser.add_argument("output", help="Output file where the compiled strings will be saved.")
# Fixing some issues with "argparse"
def argparse_error(message):
raise argparse.ArgumentError(None, message)
# Parsing launch options
parser.error = argparse_error
try:
args = parser.parse_args()
except argparse.ArgumentError as err:
print(f"\033[31m\033[1mError:\033[0m\033[31m {err.message.capitalize()}\033[39m")
print("\033[36m\033[1mUsage:\033[0m\033[36m content_index_maker.py <input_folder> <output_file>\033[39m")
sys.exit(1)
# Checking the given options are valid
if not (os.path.exists(args.input) and os.path.isdir(args.input)):
print(f"\033[31m\033[1mError:\033[0m\033[31m The given input directory '{args.input}' doesn't exist or is a file !\033[39m")
sys.exit(2)
if os.path.isdir(args.output):
print(f"\033[31m\033[1mError:\033[0m\033[31m The given output '{args.output}' is a directory !\033[39m")
sys.exit(3)
# Starting the process
print(f"Compiling '{args.input}' to '{args.output}'...")
input_folder = os.path.abspath(args.input)
output_file = os.path.abspath(args.output)
index_data = list()
for index_entry_filename in os.listdir(input_folder):
if index_entry_filename.startswith("_"):
continue
print("> Processing '{}'".format(index_entry_filename))
# Loading the YAML data
# See: https://github.com/yaml/pyyaml/issues/123#issuecomment-395431735
with open(os.path.join(input_folder, index_entry_filename), 'rt', encoding='utf8') as f:
index_entry_data = yaml.safe_load(f)
# Checking some stuff
if type(index_entry_data) is not dict:
raise ValueError(f"The data for '{index_entry_filename}' isn't a dict !")
if len(index_entry_data.keys()) < 1:
raise ValueError(f"The '{index_entry_filename}' file is empty !")
# Fixing the ID
_id_tmp = list(index_entry_data.keys())[0]
index_entry_data[_id_tmp]["id"] = _id_tmp
# Un-nesting the data
index_entry_data = index_entry_data[_id_tmp]
# Joining the preamble's lines
if "preamble" not in index_entry_data.keys():
raise ValueError(f"The 'preamble' field is missing from ''{index_entry_filename}' !")
if type(index_entry_data["preamble"]) is not dict:
raise ValueError(f"The 'preamble' field for '{index_entry_filename}' isn't a dict !")
for preamble_lang_key in index_entry_data["preamble"].keys():
if type(index_entry_data["preamble"][preamble_lang_key]) is list:
index_entry_data["preamble"][preamble_lang_key] = "<br>".join(index_entry_data["preamble"][preamble_lang_key])
# Saving the data
index_data.append(index_entry_data)
try:
os.remove(output_file)
except IOError:
pass
with open(output_file, "wb") as f:
f.write(json.dumps(index_data, separators=(',', ':'), ensure_ascii=False).encode("utf-8"))

View File

@@ -1,84 +0,0 @@
#!/bin/python
import argparse
import json
import os
import sys
# Importing YAML parser safely
try:
import yaml
except ImportError:
print("You need to install the 'PyYAML' module to continue !")
sys.exit(10)
# Including nicer-looking print function if possible.
try:
from rich import print
except ImportError:
pass
# Preparing and parsing launch arguments
parser = argparse.ArgumentParser()
parser.add_argument("input", help="Input folder where the strings are located.")
parser.add_argument("output", help="Output folder where the converted files will be saved.")
# Fixing some issues with "argparse"
def argparse_error(message):
raise argparse.ArgumentError(None, message)
# Parsing launch options
parser.error = argparse_error
try:
args = parser.parse_args()
except argparse.ArgumentError as err:
print(f"\033[31m\033[1mError:\033[0m\033[31m {err.message.capitalize()}\033[39m")
print("\033[36m\033[1mUsage:\033[0m\033[36m content_index_maker.py <input_folder> <output_file>\033[39m")
sys.exit(1)
# Checking the given options are valid
if not (os.path.exists(args.input) and os.path.isdir(args.input)):
print(f"\033[31m\033[1mError:\033[0m\033[31m The given input directory '{args.input}' doesn't exist or is a file !\033[39m")
sys.exit(2)
if not (os.path.exists(args.output) and os.path.isdir(args.output)):
print(f"\033[31m\033[1mError:\033[0m\033[31m The given output '{args.output}' is a directory !\033[39m")
sys.exit(3)
# Starting the process
print(f"Compiling '{args.input}' to '{args.output}'...")
input_folder = os.path.abspath(args.input)
output_folder = os.path.abspath(args.output)
for item_filename in os.listdir(input_folder):
if item_filename.startswith("_") or not (item_filename.endswith(".yml") or item_filename.endswith(".yaml")):
continue
print("> Processing '{}'".format(item_filename))
with open(os.path.join(input_folder, item_filename), 'r') as f:
item_raw_data = yaml.safe_load(f)
# Grabbing the output ID
output_id = list(item_raw_data.keys())[0]
# Un-nesting the data
item_raw_data = item_raw_data[output_id]
# Converting content
def process_content(content_element) -> dict:
if type(content_element) is dict:
pass
return content_element
output_content = list()
for content_item in item_raw_data["content"]:
content_item = process_content(content_item)
output_content.append(content_item)
item_raw_data["content"] = output_content
print(item_raw_data)

View File

@@ -0,0 +1,25 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:pycache
echo.
echo Removing '__pycache__' folders
echo ------------------------------
:pycache-delete
echo Deleting folders...
pushd %CD%
cd ..
for /r %%d in (.) do (
rmdir /Q /S "%%d\__pycache__" 2> nul
)
popd
:pycache-end
:end

View File

@@ -1,27 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:js-decimaljs
echo.
echo Handling DecimalJS library
echo --------------------------
:js-decimaljs-minify
echo Minifying Decimal.JS
pushd %CD%
cd %~dp0\resources\DecimalJs\10.4.3\
echo ^> resources\DecimalJs\10.4.3\decimal.mjs
call "%~dp0node_modules\.bin\terser" decimal.mjs -c -m --toplevel -o decimal.min.mjs
cd %~dp0\resources\DecimalJsLight\2.5.1\
echo ^> resources\DecimalJsLight\2.5.1\decimal.mjs
call "%~dp0node_modules\.bin\terser" decimal.mjs -c -m --toplevel -o decimal.min.mjs
popd
:js-decimaljs-end
:end

View File

@@ -1,20 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:content
echo.
echo Handling the raw tools files
echo -----------------------------
:content-compile-index
echo Compiling index files...
python content_index_maker.py ./tools/raw_index/ ./tools/index.json
:content-end
:end

View File

@@ -1,54 +0,0 @@
const fs = require("fs");
const path = require("path");
// Grabbing launch arguments
if(process.argv.length !== 5) {
console.error('!> Invalid syntax !');
console.error('Use: node fix-import-path.js <input_file> <import_name> <replacement_file>');
process.exit(1);
}
const inputFile = process.argv[2];
const inputImportName = process.argv[3];
const inputReplacement = process.argv[4];
let filesToProcess = inputFile.split(";");
// Fixing the files
for(const fileToProcess of filesToProcess) {
console.log("> Replacing '"+inputImportName+"' with '"+inputReplacement+"' in '"+fileToProcess+"' ...");
const inputFileLines = fs.readFileSync(fileToProcess).toString().split("\n");
if(inputFileLines == null) {
console.error('!> Failed to read lines !');
process.exit(2);
}
const outputFileLines = [];
for(let inputLine of inputFileLines) {
if(inputLine.startsWith("import") && inputLine.includes("from")) {
inputLine = inputLine.split(/['"]+/);
// inputLine is now an array !
//console.log(inputLine);
inputLine[inputLine.length - 2] = inputLine[inputLine.length - 2].replace(
inputImportName, inputReplacement
);
inputLine = inputLine.join("\"");
}
outputFileLines.push(inputLine);
}
try {
fs.unlinkSync(fileToProcess);
fs.writeFileSync(fileToProcess, outputFileLines.join("\n"), "utf8");
} catch(err) {
console.error(err);
}
}

View File

@@ -1,46 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:clean
call "%~dp0clean.bat"
:clean-end
:php
echo.
echo Handling the PHP files
echo -----------------------
:php-minify
echo Minifying PHP files...
pushd %CD%
:: We minify the .php files to help with some weird spacing issues that cannot be fixed with CSS.
:: This issue is usually handled by the reverse-proxy or a middleware, but since I need to export SPA(s), I can't rely on it
for /r "%CD%" %%F in (*.php) do (
set inputPath=%%F
set outputPath=%%~dpnF.min.php
echo ^> "!inputPath!" =^> "!outputPath!"
call "%~dp0node_modules\.bin\html-minifier-terser" --conservative-collapse --collapse-inline-tag-whitespace ^
--collapse-whitespace --remove-comments --decode-entities --continue-on-parse-error -o "!outputPath!" "!inputPath!"
)
popd
:php-relink
echo Linking minified PHP files together...
pushd %CD%
:: We change every .php extension to .min.php in all the minified file.
:: I didn't use Python because it fails miserably with utf-8 symbols...
for /r "%CD%" %%F in (*.min.php) do (
node "%~dp0php-relinker.js" "%%F"
)
popd
:php-end
:end

View File

@@ -1,25 +0,0 @@
const fs = require('fs');
if (process.argv.length < 3) {
console.log('Usage: node php-relinker.js <input_php_file>');
process.exit(1);
}
const inputFilePath = process.argv[2];
console.log(">", inputFilePath);
function replaceExtension(match) {
return match.replace('.php', '.min.php');
}
try {
const content = fs.readFileSync(inputFilePath, 'utf-8');
const modifiedContent = content.replace(/include.*\.php/g, replaceExtension);
fs.writeFileSync(inputFilePath, modifiedContent, 'utf-8');
} catch (error) {
if (error.code === 'ENOENT') {
console.log('> Error: File not found.');
} else {
console.error('> Error: An error occurred =>', error.message);
}
}

770
scripts/package-lock.json generated Normal file
View File

@@ -0,0 +1,770 @@
{
"name": "scripts",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"devDependencies": {
"html-minifier-terser": "^7.2.0",
"minify": "^10.2.0",
"rollup": "^3.27.2",
"sass": "^1.63.6",
"terser": "^5.19.0",
"typescript": "^5.1.6"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/set-array": "^1.2.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
"@jridgewell/trace-mapping": "^0.3.24"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/set-array": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/source-map": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.25",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@putout/minify": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@putout/minify/-/minify-2.11.0.tgz",
"integrity": "sha512-HNOICCQIwKqjz9MZxQimWI8c3PvoehY4qlg5N5/tCWT+JJfZQUiRWQgm6RQ9rP85ReoSO20HShH22naVMpbFog==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=16"
}
},
"node_modules/acorn": {
"version": "8.12.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"license": "ISC",
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true,
"license": "MIT"
},
"node_modules/camel-case": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
"integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
"dev": true,
"license": "MIT",
"dependencies": {
"pascal-case": "^3.1.2",
"tslib": "^2.0.3"
}
},
"node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/clean-css": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz",
"integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==",
"dev": true,
"license": "MIT",
"dependencies": {
"source-map": "~0.6.0"
},
"engines": {
"node": ">= 10.0"
}
},
"node_modules/commander": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14"
}
},
"node_modules/css-b64-images": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/css-b64-images/-/css-b64-images-0.2.5.tgz",
"integrity": "sha512-TgQBEdP07adhrDfXvI5o6bHGukKBNMzp2Ngckc/6d09zpjD2gc1Hl3Ca1CKgb8FXjHi88+Phv2Uegs2kTL4zjg==",
"dev": true,
"bin": {
"css-b64-images": "bin/css-b64-images"
},
"engines": {
"node": "*"
}
},
"node_modules/debug": {
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/dot-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
"integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
"dev": true,
"license": "MIT",
"dependencies": {
"no-case": "^3.0.4",
"tslib": "^2.0.3"
}
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/find-up": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
"integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
"dev": true,
"license": "MIT",
"dependencies": {
"locate-path": "^7.1.0",
"path-exists": "^5.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"license": "ISC",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/html-minifier-terser": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz",
"integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==",
"dev": true,
"license": "MIT",
"dependencies": {
"camel-case": "^4.1.2",
"clean-css": "~5.3.2",
"commander": "^10.0.0",
"entities": "^4.4.0",
"param-case": "^3.0.4",
"relateurl": "^0.2.7",
"terser": "^5.15.1"
},
"bin": {
"html-minifier-terser": "cli.js"
},
"engines": {
"node": "^14.13.1 || >=16.0.0"
}
},
"node_modules/immutable": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
"integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
"dev": true,
"license": "MIT"
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"license": "MIT",
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/jju": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
"integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
"dev": true,
"license": "MIT"
},
"node_modules/locate-path": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
"integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-locate": "^6.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lower-case": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
"integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
"dev": true,
"license": "MIT",
"dependencies": {
"tslib": "^2.0.3"
}
},
"node_modules/minify": {
"version": "10.5.2",
"resolved": "https://registry.npmjs.org/minify/-/minify-10.5.2.tgz",
"integrity": "sha512-/7aNrZ7kMe43o0NQUftL/H9QBi15FYEUo7tnw0Nrcc+XsmNS6nP4cIL4iqrNzSzv1rUaHLBxpmYbETKT9dKZiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@putout/minify": "^2.0.0",
"clean-css": "^5.0.1",
"css-b64-images": "~0.2.5",
"debug": "^4.1.0",
"find-up": "^6.1.0",
"html-minifier-terser": "^7.1.0",
"readjson": "^2.2.2",
"simport": "^1.2.0",
"try-catch": "^3.0.0",
"try-to-catch": "^3.0.0"
},
"bin": {
"minify": "bin/minify.js"
},
"engines": {
"node": ">=16"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true,
"license": "MIT"
},
"node_modules/no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
"integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
"dev": true,
"license": "MIT",
"dependencies": {
"lower-case": "^2.0.2",
"tslib": "^2.0.3"
}
},
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/p-limit": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
"integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"yocto-queue": "^1.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
"integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-limit": "^4.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/param-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
"integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
"dev": true,
"license": "MIT",
"dependencies": {
"dot-case": "^3.0.4",
"tslib": "^2.0.3"
}
},
"node_modules/pascal-case": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
"integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
"dev": true,
"license": "MIT",
"dependencies": {
"no-case": "^3.0.4",
"tslib": "^2.0.3"
}
},
"node_modules/path-exists": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
"integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"license": "MIT",
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/readjson": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/readjson/-/readjson-2.2.2.tgz",
"integrity": "sha512-PdeC9tsmLWBiL8vMhJvocq+OezQ3HhsH2HrN7YkhfYcTjQSa/iraB15A7Qvt7Xpr0Yd2rDNt6GbFwVQDg3HcAw==",
"dev": true,
"license": "MIT",
"dependencies": {
"jju": "^1.4.0",
"try-catch": "^3.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/relateurl": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
"integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/rollup": {
"version": "3.29.4",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
"integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
"dev": true,
"license": "MIT",
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=14.18.0",
"npm": ">=8.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/sass": {
"version": "1.77.8",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz",
"integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/simport": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/simport/-/simport-1.2.0.tgz",
"integrity": "sha512-85Bm7pKsqiiQ8rmYCaPDdlXZjJvuW6/k/FY8MTtLFMgU7f8S00CgTHfRtWB6KwSb6ek4p9YyG2enG1+yJbl+CA==",
"dev": true,
"license": "MIT",
"dependencies": {
"readjson": "^2.2.0",
"try-to-catch": "^3.0.0"
},
"engines": {
"node": ">=12.2"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-support": {
"version": "0.5.21",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
"license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
"node_modules/terser": {
"version": "5.31.6",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz",
"integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
"acorn": "^8.8.2",
"commander": "^2.20.0",
"source-map-support": "~0.5.20"
},
"bin": {
"terser": "bin/terser"
},
"engines": {
"node": ">=10"
}
},
"node_modules/terser/node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"license": "MIT"
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/try-catch": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/try-catch/-/try-catch-3.0.1.tgz",
"integrity": "sha512-91yfXw1rr/P6oLpHSyHDOHm0vloVvUoo9FVdw8YwY05QjJQG9OT0LUxe2VRAzmHG+0CUOmI3nhxDUMLxDN/NEQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/try-to-catch": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-3.0.1.tgz",
"integrity": "sha512-hOY83V84Hx/1sCzDSaJA+Xz2IIQOHRvjxzt+F0OjbQGPZ6yLPLArMA0gw/484MlfUkQbCpKYMLX3VDCAjWKfzQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/tslib": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
"dev": true,
"license": "0BSD"
},
"node_modules/typescript": {
"version": "5.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/yocto-queue": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz",
"integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
}
}
}

View File

@@ -1,22 +0,0 @@
@echo off
setlocal enabledelayedexpansion
:: Going into the script's directory
cd /D "%~dp0"
:python
echo.
echo Setting up Python...
echo --------------------
:python-install
echo Installing packages...
pushd %CD%
call pip install -r requirements.txt
popd
:python-end
:end

View File

@@ -1 +0,0 @@
PyYAML>=6.0.1