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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.git
2+
.build
3+
.swiftpm
4+
Package.resolved

.gitignore

Lines changed: 6 additions & 0 deletions
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

Lines changed: 12 additions & 0 deletions
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

Lines changed: 19 additions & 0 deletions
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

Lines changed: 37 additions & 0 deletions
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

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 35 additions & 0 deletions
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)