1
Fork 0
mirror of https://github.com/RGBCube/ThemeNix synced 2025-07-28 08:57:46 +00:00

Make slugs only exist in runtime, add info fields to theme.<name>.withHashtag.{name, author}, fix templates issue

This commit is contained in:
RGBCube 2023-11-26 22:57:44 +03:00
parent 8dad0349c4
commit 4d4ec5a91b
No known key found for this signature in database
253 changed files with 17 additions and 265 deletions

View file

@ -24,7 +24,6 @@ def theme-to-nix [
} else {
$line
| str replace "scheme" "name "
| str replace "slug" "slug "
| str replace '"' ""
| str replace '"' ""
| str replace ":" " ="
@ -61,11 +60,11 @@ def main [] {
ls base16-schemes
| filter { ($in.name | str ends-with ".yml") or ($in.name | str ends-with ".yaml") }
| each { |it|
let new_path = "themes/" + ($it.name | path basename | split row "." | first)
let new_path = "themes/" + ($it.name | path basename | split row "." | first) + ".nix"
echo $"converting ($it.name) to ($new_path)..."
theme-to-nix ({ slug: ($new_path | split row "/" | last) } | merge (open $it.name)) | save --force ($new_path + ".nix")
theme-to-nix (open $it.name) | save --force $new_path
}
generate-valid-themes