Files
elixforms-moduli/scripts/extract-elx-module.psm1
T
administrator 0fe463338a add more scripts to automatically update:
- last updated elx file
- all elx files
2026-05-26 13:36:48 +02:00

36 lines
1.1 KiB
PowerShell

function Save-ElxInternals {
param(
[ValidateScript({ Test-Path $_ -PathType Leaf })][Parameter(Mandatory)]$ModulePath
)
Write-Host "Switching to ELX Tools directory..."
$extractElxToolsScriptPath = Join-Path $PSScriptRoot "../tools/extract-elx/"
Push-Location -StackName ElxTools $extractElxToolsScriptPath
Write-Host "Installing Node.js dependencies for the ELX Tools..."
# Install Node.js dependencies for the ELX Tools
& npm install
if ($LASTEXITCODE -ne 0) {
Write-Error "npm install failed with exit code $LASTEXITCODE."
exit 1
}
Write-Host "Node.js dependencies installed successfully!" -ForegroundColor Cyan
Write-Host "Executing ELX extraction..."
& node "extract-elx.js" $ModulePath --clean
if ($LASTEXITCODE -ne 0) {
Write-Error "ELX extraction failed with exit code $LASTEXITCODE."
exit 1
}
Write-Host "ELX extraction completed successfully!" -ForegroundColor Green
Write-Host "Switching back to original directory..."
Pop-Location -StackName ElxTools
}
Export-ModuleMember -Function Save-ElxInternals