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

Commit 4c0fc1a

Browse files
committed
Initial import
0 parents  commit 4c0fc1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2525
-0
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.git
2+
.build
3+
.swiftpm
4+
Package.resolved

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
.swiftpm

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM swift:5.1 as builder
2+
WORKDIR /swiftdoc
3+
COPY . .
4+
RUN mkdir -p /build/lib && cp -R /usr/lib/swift/linux/*.so* /build/lib
5+
RUN make install prefix=/build
6+
7+
FROM ubuntu:18.04
8+
RUN apt-get -qq update && apt-get install -y libatomic1 && rm -r /var/lib/apt/lists/*
9+
COPY --from=builder /build/bin/swift-doc /usr/bin
10+
COPY --from=builder /build/lib/* /usr/lib/
11+
ENTRYPOINT ["swift-doc"]
12+
CMD ["--help"]

LICENSE.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright 2019 Read Evaluate Press, LLC
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a
4+
copy of this software and associated documentation files (the "Software"),
5+
to deal in the Software without restriction, including without limitation
6+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
and/or sell copies of the Software, and to permit persons to whom the
8+
Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19+
DEALINGS IN THE SOFTWARE.

Makefile

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
SHELL = /bin/bash
2+
3+
prefix ?= /usr/local
4+
bindir ?= $(prefix)/bin
5+
srcdir = Sources
6+
7+
REPODIR = $(shell pwd)
8+
BUILDDIR = $(REPODIR)/.build
9+
SOURCES = $(wildcard $(srcdir)/**/*.swift)
10+
11+
.DEFAULT_GOAL = all
12+
13+
.PHONY: all
14+
all: swift-doc
15+
16+
swift-doc: $(SOURCES)
17+
@swift build \
18+
-c release \
19+
--disable-sandbox \
20+
--build-path "$(BUILDDIR)"
21+
22+
.PHONY: install
23+
install: swift-doc
24+
@install -d "$(bindir)"
25+
@install "$(BUILDDIR)/release/swift-doc" "$(bindir)"
26+
27+
.PHONY: uninstall
28+
uninstall:
29+
@rm -rf "$(bindir)/swift-doc"
30+
31+
.PHONY: clean
32+
distclean:
33+
@rm -f $(BUILDDIR)/release
34+
35+
.PHONY: clean
36+
clean: distclean
37+
@rm -rf $(BUILDDIR)

Package.resolved

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "Commander",
6+
"repositoryURL": "https://github.com/kylef/Commander.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "4b6133c3071d521489a80c38fb92d7983f19d438",
10+
"version": "0.9.1"
11+
}
12+
},
13+
{
14+
"package": "CommonMark",
15+
"repositoryURL": "https://github.com/SwiftDocOrg/CommonMark.git",
16+
"state": {
17+
"branch": "master",
18+
"revision": "81b2698f19e83d33276c3ee55e7178d23913216e",
19+
"version": null
20+
}
21+
},
22+
{
23+
"package": "Spectre",
24+
"repositoryURL": "https://github.com/kylef/Spectre.git",
25+
"state": {
26+
"branch": null,
27+
"revision": "f14ff47f45642aa5703900980b014c2e9394b6e5",
28+
"version": "0.9.0"
29+
}
30+
},
31+
{
32+
"package": "cmark",
33+
"repositoryURL": "https://github.com/SwiftDocOrg/swift-cmark.git",
34+
"state": {
35+
"branch": null,
36+
"revision": "2a766030bee955b4806044fd7aca1b6884475138",
37+
"version": "0.28.3+20200110.2a76603"
38+
}
39+
},
40+
{
41+
"package": "SwiftSyntax",
42+
"repositoryURL": "https://github.com/apple/swift-syntax.git",
43+
"state": {
44+
"branch": null,
45+
"revision": "3e3eb191fcdbecc6031522660c4ed6ce25282c25",
46+
"version": "0.50100.0"
47+
}
48+
},
49+
{
50+
"package": "SwiftMarkup",
51+
"repositoryURL": "https://github.com/SwiftDocOrg/SwiftMarkup.git",
52+
"state": {
53+
"branch": null,
54+
"revision": "8e82d625b0342fc80525956c22f9f0defa0cffce",
55+
"version": "0.0.4"
56+
}
57+
},
58+
{
59+
"package": "SwiftSemantics",
60+
"repositoryURL": "https://github.com/SwiftDocOrg/SwiftSemantics.git",
61+
"state": {
62+
"branch": "master",
63+
"revision": "8a5a57fba79d3a5ef4e568c549397a12392a7a03",
64+
"version": null
65+
}
66+
}
67+
]
68+
},
69+
"version": 1
70+
}

Package.swift

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swift-tools-version:5.1
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swift-doc",
8+
dependencies: [
9+
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .branch("master")),
10+
.package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.0.4")),
11+
.package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .branch("master")),
12+
.package(url: "https://github.com/apple/swift-syntax.git", .exact("0.50100.0")),
13+
.package(url: "https://github.com/kylef/Commander.git", .upToNextMinor(from: "0.9.1")),
14+
],
15+
targets: [
16+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
17+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
18+
.target(
19+
name: "swift-doc",
20+
dependencies: ["SwiftDoc", "SwiftSemantics", "SwiftMarkup", "CommonMarkBuilder", "Commander"]
21+
),
22+
.target(
23+
name: "swift-dcov",
24+
dependencies: ["SwiftSyntax", "SwiftSemantics", "SwiftMarkup", "SwiftDoc", "Commander"]
25+
),
26+
.target(
27+
name: "swift-api-inventory",
28+
dependencies: ["SwiftDoc", "SwiftSemantics", "Commander"]
29+
),
30+
.target(
31+
name: "SwiftDoc",
32+
dependencies: ["SwiftSyntax", "SwiftSemantics", "SwiftMarkup"]
33+
),
34+
]
35+
)

0 commit comments

Comments
 (0)