Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
remote resource URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
literalpie committed Oct 17, 2020
1 parent 969f8f1 commit add500f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/swift-doc/Subcommands/Generate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ extension SwiftDoc {
if case .html = format {
let cssData = try fetchRemoteCSS()
let jsData = try fetchRemoteJS()
// print("jsData \(jsData.strin)")
let cssURL = outputDirectoryURL.appendingPathComponent("all.css")
try writeFile(cssData, to: cssURL)
let jsURL = outputDirectoryURL.appendingPathComponent("all.js")
Expand All @@ -134,11 +133,11 @@ extension SwiftDoc {
}

func fetchRemoteCSS() throws -> Data {
let url = URL(string: "https://raw.githubusercontent.com/literalpie/swift-doc/9fe829b46564c9a41eac95a47918c24dca7a00a1/Resources/all.min.css")!
let url = URL(string: "https://raw.githubusercontent.com/literalpie/swift-doc/5165f782d33d437f7bccf3c2fa5f89b039134f73/Resources/all.min.css")!
return try Data(contentsOf: url)
}

func fetchRemoteJS() throws -> Data {
let url = URL(string: "https://raw.githubusercontent.com/literalpie/swift-doc/9fe829b46564c9a41eac95a47918c24dca7a00a1/Resources/all.js")!
let url = URL(string: "https://raw.githubusercontent.com/literalpie/swift-doc/5165f782d33d437f7bccf3c2fa5f89b039134f73/Resources/all.js")!
return try Data(contentsOf: url)
}

0 comments on commit add500f

Please sign in to comment.