22// View.swift
33// MacroExpress
44//
5- // Created by Helge Heß on 07.09.25.
5+ // Created by Helge Heß on 09/07/25.
6+ // Copyright © 2025 ZeeZide GmbH. All rights reserved.
67//
78
8- import Macro
9+ import MacroCore
10+ import fs
911
1012public extension SettingsHolder {
1113
@@ -22,11 +24,10 @@ public extension SettingsHolder {
2224 /**
2325 * The views directory for templates set by `app.set("views", "views")`.
2426 */
25- @inlinable
2627 var views : [ String ] {
2728 switch settings [ " views " ] {
2829 case . none:
29- return [ process. env [ " EXPRESS_VIEWS " ] ?? __dirname ( ) + " /views " ]
30+ return [ process. env [ " EXPRESS_VIEWS " ] ?? __dirname ( ) + " /views " ]
3031 case let v as String : return [ v ]
3132 case let v as [ String ] : return v
3233 case . some( let v) :
@@ -59,7 +60,7 @@ extension Express {
5960
6061 /// The render function for the extension specified in ``ext`` (i.e. passed
6162 /// explicitly to the render function, like `render("index.mustache")`.
62- public let engine : ExpressEngine ?
63+ public var engine : ExpressEngine ?
6364
6465 /// All known engines
6566 private let engines : [ String : ExpressEngine ]
@@ -69,7 +70,7 @@ extension Express {
6970
7071 public required init ( name: String , options: Express ) {
7172 self . name = name
72- self . ext = Macro . path. extname ( name)
73+ self . ext = fs . path. extname ( name)
7374 self . engines = options. engines
7475 self . root = options. views
7576 self . defaultEngine = options. defaultEngine
0 commit comments