Skip to content

Commit 962001b

Browse files
committed
version schema exports
1 parent 89d79c9 commit 962001b

File tree

7 files changed

+26
-8
lines changed

7 files changed

+26
-8
lines changed

.github/scripts/schema-doc.rb

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
content = File.read(Routes.root / "squarkdown/resources/squarkup-schema.json")
1414

1515
schema = JSON.parse(content)
16+
Version = schema["version"]
1617

1718
## Render
1819
rows = schema["properties"].map do |field, props|
@@ -37,3 +38,8 @@
3738

3839

3940
log done: true
41+
42+
43+
def get_version
44+
return Version
45+
end

.github/scripts/schema-sync.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99

1010
log "syncing squarkup schema..."
1111

12+
version = ARGV[0]
13+
1214
route = Routes.root / "squarkdown/resources/squarkup-schema.json"
13-
dest = Routes.site / "static/squarkup-schema/latest.json"
14-
FileUtils.cp(route, dest)
15+
dest = Routes.site / "static/squarkup-schema"
16+
17+
dest.mkpath()
18+
FileUtils.cp(route, dest / "latest.json")
19+
FileUtils.cp(route, dest / "v#{version}.json")
1520

1621
log done: true

.squarkdown/squarkup.json

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"jpg", "jpeg", "png", "svg", "ttf"
2929
],
3030
"fonts / queries": [
31-
"Fira+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400",
3231
"Sora:wght@100..800"
3332
]
3433
}

Rakefile

+8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ task default: :squark
22

33

44
## Tasks
5+
56
task :test do
67
Dir.glob("./tests/**/*.rb").each { |file| require file }
78
end
89

910

1011
## Scripts
12+
1113
task :squark, :fonts, :assets, :scss do |task, args|
1214
args.with_defaults({
1315
fonts: nil,
@@ -16,3 +18,9 @@ task :squark, :fonts, :assets, :scss do |task, args|
1618
})
1719
ruby "squarkdown/squarkup.rb", *args
1820
end
21+
22+
23+
task :schema do
24+
require_relative ".github/scripts/schema-doc.rb"
25+
ruby ".github/scripts/schema-sync.rb", get_version
26+
end

site/src/app.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<link rel="preconnect" href="https://fonts.googleapis.com">
1414
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
15-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400&family=Sora:wght@100..800&display=swap">
15+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@100..800&display=swap">
1616
</head>
1717

1818
<body data-sveltekit-preload-data="hover">

site/src/site.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@
161161
},
162162
"docs/reference/squarkup-json.md": {
163163
"path": "docs/reference/squarkup-json.md",
164-
"last_deploy": "2025-03-11 17:52:19 +0000",
165-
"slocs": 38,
166-
"chars": 3613,
164+
"last_deploy": "2025-03-11 18:19:12 +0000",
165+
"slocs": 78,
166+
"chars": 4367,
167167
"isIndex": false,
168168
"flags": [
169169
"live"

squarkdown/resources/squarkup-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
// "$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"version": "5.0",
3+
"version": "5.0.1",
44
"title": "Squarkup Configuration Schema",
55
"description": "Squarkup configurations for a repository.",
66

0 commit comments

Comments
 (0)