File tree Expand file tree Collapse file tree 6 files changed +37
-0
lines changed Expand file tree Collapse file tree 6 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ MODULE_VERSION=$1
5
+ OUTPUT=$2
6
+ SWIFT_VERSION=" 4.0"
7
+ AUTHOR=" Alexis Aubry"
8
+ AUTHOR_URL=" https://twitter.com/_alexaubry"
9
+ MODULE_NAME=" JavaScriptKit"
10
+ COPYRIGHT=" Copyright © 2017 $AUTHOR . Available under the MIT License."
11
+ GITHUB_URL=" https://github.com/alexaubry/JavaScriptKit"
12
+ GH_PAGES_URL=" https://alexaubry.github.io/JavaScriptKit"
13
+
14
+ jazzy \
15
+ --swift-version $SWIFT_VERSION \
16
+ -a " $AUTHOR " \
17
+ -u " $AUTHOR_URL " \
18
+ -m " $MODULE_NAME " \
19
+ --module-version " $MODULE_VERSION " \
20
+ --copyright " $COPYRIGHT " \
21
+ -g " $GITHUB_URL " \
22
+ --github-file-prefix " $GITHUB_URL /tree/master" \
23
+ -r " $GH_PAGES_URL " \
24
+ -o " $OUTPUT " \
25
+ --min-acl public \
26
+ --use-safe-filenames
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ public final class JSFunction<T>: JSExpression where T: Decodable {
63
63
self . arguments = arguments
64
64
}
65
65
66
+ /// Creates the JavaScript text of the expression.
66
67
public func makeExpressionString( ) throws -> String {
67
68
68
69
let encoder = JavaScriptEncoder ( )
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ public final class JSScript<T>: JSExpression where T: Decodable {
65
65
self . javaScriptString = javaScriptString
66
66
}
67
67
68
+ /// Creates the JavaScript text of the expression.
68
69
public func makeExpressionString( ) -> String {
69
70
return javaScriptString
70
71
}
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ public final class JSVariable<T>: JSExpression where T: Decodable {
55
55
self . keyPath = keyPath
56
56
}
57
57
58
+ /// Creates the JavaScript text of the expression.
58
59
public func makeExpressionString( ) -> String {
59
60
return " this. \( keyPath) ; "
60
61
}
Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ public enum JSErrorDomain {
30
30
31
31
extension JSErrorDomain : LocalizedError {
32
32
33
+ /// The identifier of the error domain.
33
34
public static var identifier = " fr.alexaubry.JavaScriptKit.JSErrorDomain "
34
35
36
+ /// The code of the error.
35
37
public var code : Int {
36
38
37
39
switch self {
@@ -47,6 +49,7 @@ extension JSErrorDomain: LocalizedError {
47
49
48
50
}
49
51
52
+ /// The localized description of the error.
50
53
public var localizedDescription : String {
51
54
52
55
switch self {
@@ -65,6 +68,7 @@ extension JSErrorDomain: LocalizedError {
65
68
66
69
}
67
70
71
+ /// The error that caused this error to be thrown.
68
72
public var underlyingError : NSError ? {
69
73
70
74
switch self {
@@ -89,6 +93,7 @@ extension JSErrorDomain: LocalizedError {
89
93
90
94
}
91
95
96
+ /// The localized description of the error.
92
97
public var errorDescription : String {
93
98
return localizedDescription
94
99
}
Original file line number Diff line number Diff line change @@ -11,5 +11,8 @@ import CoreGraphics
11
11
///
12
12
13
13
public struct JSVoid : Equatable , Decodable {
14
+
15
+ /// Compares two Void values. Always evaluates to `true`.
14
16
public static func == ( lhs: JSVoid , rhs: JSVoid ) -> Bool { return true }
17
+
15
18
}
You can’t perform that action at this time.
0 commit comments