17 lines
550 B
PowerShell
17 lines
550 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$uniScss = Get-Content -Raw -Encoding UTF8 (Join-Path $root 'uni.scss')
|
|
|
|
foreach ($token in @('$brand-red:', '$ink:', '$paper:', '$gold:')) {
|
|
if ($uniScss -notmatch [regex]::Escape($token)) {
|
|
throw "uni.scss must directly define $token"
|
|
}
|
|
}
|
|
|
|
if ($uniScss -match '@(?:import|use|forward)\s+["''](?:\./|\.\./)') {
|
|
throw 'uni.scss must not use relative Sass imports because it is injected into every page stylesheet.'
|
|
}
|
|
|
|
Write-Output 'PASS uni.scss injection contract'
|