Skip to content

Commit d7a5478

Browse files
author
James Brundage
committed
feat: Adding txt files ( Fixes #61 )
1 parent a2591e2 commit d7a5478

File tree

4 files changed

+5
-649
lines changed

4 files changed

+5
-649
lines changed

Build/4bitcss.build.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ foreach ($jsonFile in $jsonFiles) {
5151
$jsonObject.Name | Convert-4BitName
5252

5353
if (-not $colorSchemeFileName) { continue }
54+
$distinctColors = @($jsonObject.psobject.Properties.value) -match '^#[0-9a-fA-F]{6}' | Select-Object -Unique
55+
5456
$allPalletes[$colorSchemeFileName] = $jsonObject
5557
# If the name wasn't there, continue.
5658
if (-not $jsonObject.Name) { continue }
@@ -66,7 +68,9 @@ foreach ($jsonFile in $jsonFiles) {
6668
}
6769
# Then export it again to /docs (so the GitHub page works)
6870
$jsonObject | Export-4BitCSS -OutputPath $ColorSchemePath
69-
71+
$dotTextPath = Join-Path $ColorSchemePath "$colorSchemeFileName.txt"
72+
$distinctColors | Set-Content -Path $dotTextPath -Encoding utf8
73+
Get-Item -Path $dotTextPath
7074
$allColorSchemes += $colorSchemeFileName
7175

7276
$wasBright = $colorSchemeCssFile | Select-String "IsBright: 1"

docs/allBrightColorSchemes.json

Lines changed: 0 additions & 52 deletions
This file was deleted.

docs/allColorSchemes.json

Lines changed: 0 additions & 323 deletions
This file was deleted.

0 commit comments

Comments
 (0)