mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
Upgrade to Ink 0.6 and Plot 0.14
This commit is contained in:
parent
9506d2dd8c
commit
e07f0c5c4d
6 changed files with 39 additions and 45 deletions
|
|
@ -6,8 +6,8 @@
|
|||
"repositoryURL": "https://github.com/johnsundell/ink.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "77c3d8953374a9cf5418ef0bd7108524999de85a",
|
||||
"version": "0.5.1"
|
||||
"revision": "bcc9f219900a62c4210e6db726035d7f03ae757b",
|
||||
"version": "0.6.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
"repositoryURL": "https://github.com/johnsundell/plot.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "b358860fe565eb53e98b1f5807eb5939c8124547",
|
||||
"version": "0.11.0"
|
||||
"revision": "271926b4413fe868739d99f5eadcf2bd6cd62fb8",
|
||||
"version": "0.14.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version:5.1
|
||||
// swift-tools-version:5.10
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
|
@ -6,14 +6,14 @@ import PackageDescription
|
|||
let package = Package(
|
||||
name: "gensite",
|
||||
platforms: [
|
||||
.macOS(.v10_15),
|
||||
.iOS(.v13),
|
||||
.macOS(.v14),
|
||||
.iOS(.v17),
|
||||
],
|
||||
dependencies: [
|
||||
.package(path: "../samhuri.net"),
|
||||
],
|
||||
targets: [
|
||||
.target( name: "gensite", dependencies: [
|
||||
.executableTarget( name: "gensite", dependencies: [
|
||||
"samhuri.net",
|
||||
]),
|
||||
.testTarget(name: "gensiteTests", dependencies: ["gensite"]),
|
||||
|
|
|
|||
|
|
@ -1,25 +1,24 @@
|
|||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "Ink",
|
||||
"repositoryURL": "https://github.com/johnsundell/ink.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "77c3d8953374a9cf5418ef0bd7108524999de85a",
|
||||
"version": "0.5.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Plot",
|
||||
"repositoryURL": "https://github.com/johnsundell/plot.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "b358860fe565eb53e98b1f5807eb5939c8124547",
|
||||
"version": "0.11.0"
|
||||
}
|
||||
"originHash" : "1912cd4185c680b826a0cb106effaca327bfc97ee755dd52a44214c989cc02cc",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "ink",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/johnsundell/ink.git",
|
||||
"state" : {
|
||||
"revision" : "bcc9f219900a62c4210e6db726035d7f03ae757b",
|
||||
"version" : "0.6.0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
},
|
||||
{
|
||||
"identity" : "plot",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/johnsundell/plot.git",
|
||||
"state" : {
|
||||
"revision" : "271926b4413fe868739d99f5eadcf2bd6cd62fb8",
|
||||
"version" : "0.14.0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version:5.1
|
||||
// swift-tools-version:5.10
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
|
@ -6,8 +6,8 @@ import PackageDescription
|
|||
let package = Package(
|
||||
name: "samhuri.net",
|
||||
platforms: [
|
||||
.macOS(.v10_15),
|
||||
.iOS(.v13),
|
||||
.macOS(.v14),
|
||||
.iOS(.v17),
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
|
|
@ -16,8 +16,8 @@ let package = Package(
|
|||
targets: ["samhuri.net"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/johnsundell/ink.git", from: "0.5.1"),
|
||||
.package(url: "https://github.com/johnsundell/plot.git", from: "0.11.0"),
|
||||
.package(url: "https://github.com/johnsundell/ink.git", exact: "0.6.0"),
|
||||
.package(url: "https://github.com/johnsundell/plot.git", exact: "0.14.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
|
|
@ -25,9 +25,10 @@ let package = Package(
|
|||
.target(
|
||||
name: "samhuri.net",
|
||||
dependencies: [
|
||||
"Ink",
|
||||
"Plot",
|
||||
]),
|
||||
.product(name: "Ink", package: "ink"),
|
||||
.product(name: "Plot", package: "plot"),
|
||||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "samhuri.netTests",
|
||||
dependencies: ["samhuri.net"]),
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ extension Node where Context == HTML.BodyContext {
|
|||
}
|
||||
|
||||
extension Node where Context == HTML.ListContext {
|
||||
static func postItem(_ post: Post, date: Node<HTML.BodyContext>) -> Self {
|
||||
static func postItem(_ post: Post, date: Node<HTML.TimeContext>) -> Self {
|
||||
.if(post.isLink, .li(
|
||||
.a(.href(post.link?.absoluteString ?? post.path), "→ \(post.title)"),
|
||||
.time(date),
|
||||
|
|
|
|||
|
|
@ -23,9 +23,3 @@ extension Node where Context == HTML.HeadContext {
|
|||
.link(.attribute(named: "rel", value: "mask-icon"), .attribute(named: "color", value: color), .href(url))
|
||||
}
|
||||
}
|
||||
|
||||
extension Node where Context == HTML.BodyContext {
|
||||
static func time(_ nodes: Node<HTML.BodyContext>...) -> Self {
|
||||
.element(named: "time", nodes: nodes)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue