Skip to content

Commit

Permalink
Adjustments for Mustache 1.0.2
Browse files Browse the repository at this point in the history
Minor API changes, bad semver.
  • Loading branch information
helje5 committed Oct 10, 2024
1 parent e25f57f commit 5fef206
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
.package(url: "https://github.com/Macro-swift/Macro.git",
from: "1.0.2"),
.package(url: "https://github.com/AlwaysRightInstitute/mustache.git",
from: "1.0.1")
from: "1.0.2")
],

targets: [
Expand All @@ -44,7 +44,8 @@ let package = Package(
.product(name: "MacroCore", package: "Macro"),
.product(name: "fs", package: "Macro"),
.product(name: "http", package: "Macro"),
"connect", "mime", "mustache"
"connect", "mime",
.product(name: "Mustache", package: "mustache")
], exclude: [ "README.md" ]),
.target(name: "MacroExpress", dependencies: [
.product(name: "MacroCore", package: "Macro"),
Expand Down
8 changes: 4 additions & 4 deletions Sources/express/Mustache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// Noze.io / Macro
//
// Created by Helge Heß on 02/06/16.
// Copyright © 2016-2020 ZeeZide GmbH. All rights reserved.
// Copyright © 2016-2024 ZeeZide GmbH. All rights reserved.
//

import func fs.readFile
import func fs.readFileSync
import enum fs.path
import let MacroCore.console
import mustache
import Mustache

let mustacheExpress : ExpressEngine = { path, options, done in
fs.readFile(path, "utf8") { err, str in
Expand All @@ -25,7 +25,7 @@ let mustacheExpress : ExpressEngine = { path, options, done in
return
}

let parser = MustacheParser()
var parser = MustacheParser()
let tree = parser.parse(string: template)

let ctx = ExpressMustacheContext(path: path, object: options)
Expand Down Expand Up @@ -53,7 +53,7 @@ class ExpressMustacheContext : MustacheDefaultRenderingContext {
return nil
}

let parser = MustacheParser()
var parser = MustacheParser()
let tree = parser.parse(string: template)
return tree
}
Expand Down

0 comments on commit 5fef206

Please sign in to comment.