File tree Expand file tree Collapse file tree
Libraries/MarkdownRenderer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ let project = Project(
2525 ) ,
2626 sources: [ " Sources/**/*.swift " ] ,
2727 resources: [
28- . folderReference( path: " Resources/MarkdownRenderer " ) ,
28+ " Resources/MarkdownRenderer/index.html " ,
29+ " Resources/MarkdownRenderer/renderer.css " ,
30+ " Resources/MarkdownRenderer/renderer.js " ,
2931 ] ,
3032 scripts: [
3133 DevLogScripts . swiftLint (
@@ -38,8 +40,6 @@ let project = Project(
3840 base: deploymentSettings. merging (
3941 [
4042 " ENABLE_USER_SCRIPT_SANDBOXING " : " NO " ,
41- " INFOPLIST_PATH " : " $(WRAPPER_NAME)/Info.plist " ,
42- " UNLOCALIZED_RESOURCES_FOLDER_PATH " : " $(WRAPPER_NAME)/Resources " ,
4343 ]
4444 ) { _, new in new }
4545 )
Original file line number Diff line number Diff line change 88import Foundation
99
1010enum MarkdownRendererBundle {
11+ static let bundle = Bundle ( for: MarkdownRendererBundleToken . self)
12+
1113 static var indexURL : URL ? {
12- indexURL ( in: Bundle ( for : MarkdownRendererBundleToken . self ) )
14+ indexURL ( in: bundle )
1315 }
1416
1517 static func indexURL( in bundle: Bundle ) -> URL ? {
1618 bundle. url (
1719 forResource: " index " ,
18- withExtension: " html " ,
19- subdirectory: " Resources/MarkdownRenderer "
20+ withExtension: " html "
2021 )
2122 }
2223}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ struct MarkdownRendererBundleTests {
1515 let url = try #require( MarkdownRendererBundle . indexURL)
1616
1717 #expect( url. lastPathComponent == " index.html " )
18- #expect( url. deletingLastPathComponent ( ) . lastPathComponent == " MarkdownRenderer " )
18+ #expect( url. deletingLastPathComponent ( ) == MarkdownRendererBundle . bundle . bundleURL )
1919 #expect( FileManager . default. fileExists ( atPath: url. path) )
2020 }
2121}
You can’t perform that action at this time.
0 commit comments