Skip to content

Commit 5d888b0

Browse files
authored
Merge pull request #35 from k-kohey/fix/module_name
Fix module name
2 parents e0c7d04 + 08d56a7 commit 5d888b0

36 files changed

+68
-67
lines changed

.github/workflows/docc.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@ name: docc
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66

77
jobs:
88
deploy:
99
runs-on: macos-12
1010
steps:
1111
- uses: actions/checkout@v3
12-
- name: make directory docs/
12+
- name: make directory docs/
1313
run: |
14+
mkdir -p docs/ParchmentCore
1415
mkdir -p docs/Parchment
15-
mkdir -p docs/ParchmentDefault
16+
- name: run generate-documentation for ParchmentCore
17+
run: swift package --allow-writing-to-directory docs/ParchmentCore
18+
generate-documentation --target ParchmentCore
19+
--disable-indexing
20+
--transform-for-static-hosting
21+
--hosting-base-path Parchment-swift/ParchmentCore
22+
--output-path docs/ParchmentCore
1623
- name: run generate-documentation for Parchment
1724
run: swift package --allow-writing-to-directory docs/Parchment
1825
generate-documentation --target Parchment
1926
--disable-indexing
2027
--transform-for-static-hosting
2128
--hosting-base-path Parchment-swift/Parchment
2229
--output-path docs/Parchment
23-
- name: run generate-documentation for ParchmentDefault
24-
run: swift package --allow-writing-to-directory docs/ParchmentDefault
25-
generate-documentation --target ParchmentDefault
26-
--disable-indexing
27-
--transform-for-static-hosting
28-
--hosting-base-path Parchment-swift/ParchmentDefault
29-
--output-path docs/ParchmentDefault
3030
- name: deploy to github pages
3131
uses: peaceiris/actions-gh-pages@v3
3232
if: ${{ github.ref == 'refs/heads/main' }}

Demo.swiftpm/Package.resolved

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

Demo.swiftpm/Package.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ let package = Package(
3737
name: "AppModule",
3838
dependencies: [
3939
.product(name: "Parchment", package: "Parchment"),
40-
.product(name: "ParchmentDefault", package: "Parchment"),
4140
]
4241
)
4342
]

Demo.swiftpm/Sources/AppModule/Demo.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import SwiftUI
22
import Parchment
3-
import ParchmentDefault
43

54
extension LoggerComponentID {
65
static let my: Self = .init("My")

EventGen/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let package = Package(
2727
name: "EventGenKit",
2828
dependencies: [
2929
.product(name: "Markdown", package: "swift-markdown"),
30-
.product(name: "Parchment", package: "Parchment"),
30+
.product(name: "ParchmentCore", package: "Parchment"),
3131
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax")
3232
]
3333
),

EventGen/Sources/EventGenKit/SwiftGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
import Foundation
9-
import Parchment
9+
import ParchmentCore
1010
import SwiftSyntax
1111
import SwiftSyntaxBuilder
1212

@@ -55,7 +55,7 @@ public struct SwiftGenerator {
5555

5656
private func generate(with definisions: [EventDefinision]) -> String {
5757
SourceFileSyntax {
58-
ImportDeclSyntax(path: [.init(name: "Parchment")])
58+
ImportDeclSyntax(path: [.init(name: "ParchmentCore")])
5959
generatedEventStructDecl
6060
extensionDecl(with: definisions)
6161
}.formatted().description

EventGen/Tests/EventGenKitTests/SwiftGeneratorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ final class SwiftGeneratorTests: XCTestCase {
4848
let result = try generator.run(with: def)
4949

5050
let expected = """
51-
import Parchment
51+
import ParchmentCore
5252
struct GeneratedEvent: Loggable {
5353
let eventName: String
5454
let parameters: [String: Sendable]

Package.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ let package = Package(
88
platforms: [.iOS(.v14), .macOS(.v11)],
99
products: [
1010
.library(
11-
name: "Parchment",
12-
targets: ["Parchment"]
11+
name: "ParchmentCore",
12+
targets: ["ParchmentCore"]
1313
),
1414
.library(
15-
name: "ParchmentDefault",
16-
targets: ["ParchmentDefault"]
15+
name: "Parchment",
16+
targets: ["Parchment"]
1717
),
1818
],
1919
dependencies: [
@@ -22,17 +22,17 @@ let package = Package(
2222
],
2323
targets: [
2424
.target(
25-
name: "Parchment",
25+
name: "ParchmentCore",
2626
swiftSettings: [
2727
.unsafeFlags([
2828
"-strict-concurrency=complete"
2929
])
3030
]
3131
),
3232
.target(
33-
name: "ParchmentDefault",
33+
name: "Parchment",
3434
dependencies: [
35-
.target(name: "Parchment"),
35+
.target(name: "ParchmentCore"),
3636
.product(name: "SQLite", package: "SQLite.swift")
3737
],
3838
swiftSettings: [
@@ -42,16 +42,16 @@ let package = Package(
4242
]
4343
),
4444
.testTarget(
45-
name: "ParchmentTests",
46-
dependencies: ["Parchment", "TestSupport"]
45+
name: "ParchmentCoreTests",
46+
dependencies: ["ParchmentCore", "TestSupport"]
4747
),
4848
.testTarget(
49-
name: "ParchmentDefaultTests",
50-
dependencies: ["ParchmentDefault", "TestSupport"]
49+
name: "ParchmentTests",
50+
dependencies: ["Parchment", "TestSupport"]
5151
),
5252
.target(
5353
name: "TestSupport",
54-
dependencies: ["Parchment"]
54+
dependencies: ["ParchmentCore"]
5555
),
5656
]
5757
)

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ If you are using the Swift Package Project, you can add a dependency for this Pa
1717

1818
```swift
1919
dependencies: [
20-
.product(name: "Parchment", package: "Parchment"),
20+
.product(name: "ParchmentCore", package: "Parchment"),
2121
// The following statements are optional
22-
.product(name: "ParchmentDefault", package: "Parchment"),
22+
.product(name: "Parchment", package: "Parchment"),
2323
]
2424
```
2525

2626
## Project Overview
2727

28-
### Parchment
28+
### ParchmentCore
2929

3030
It contains the main logic and definitions for logging processing and event logging definitions.
3131

32-
### ParchmentDefault
32+
### Parchment
3333

34-
Provides a stander implementation compliant with the Protocol provided by Parchment. If you implement your own buffer and scheduler, you do not need to add any dependencies.
34+
Provides a stander implementation compliant with the Protocol provided by ParchmentCore. If you implement your own buffer and scheduler, you do not need to add any dependencies.
3535

3636
See the [Customization](#customization) section for more details.
3737

@@ -142,8 +142,8 @@ await logger.send([\.eventName: "tapButton", \.parameters: ["ButtonID": 1]])
142142

143143
Please see the API documentation below(WIP).
144144

145-
- https://k-kohey.github.io/Parchment-swift/Parchment/documentation/parchment/
146-
- https://k-kohey.github.io/Parchment-swift/ParchmentDefault/documentation/parchmentdefault/
145+
- https://k-kohey.github.io/Parchment-swift/ParchmentCore/documentation/parchmentcore/
146+
- https://k-kohey.github.io/Parchment-swift/Parchment/documentation/Parchment/
147147

148148
## Customization
149149

@@ -159,7 +159,7 @@ To create the type and set it to logger, write as follows.
159159

160160
```swift
161161

162-
// An implementation similar to this can be found in ParchmentDefault
162+
// An implementation similar to this can be found in Parchment
163163

164164
struct DeviceDataMutation: Mutation {
165165
private let deviceParams = [
@@ -207,7 +207,7 @@ To create the type and set it to logger, write as follows.
207207

208208
```swift
209209

210-
// An implementation similar to this can be found in ParchmentDefault
210+
// An implementation similar to this can be found in Parchment
211211
final class RegularlyPollingScheduler: BufferedEventFlushScheduler {
212212
public static let `default` = RegularlyPollingScheduler(timeInterval: 60)
213213

@@ -270,6 +270,6 @@ let logger = LoggerBundler(
270270

271271
TrackingEventBuffer is a buffer that saves the log.
272272

273-
ParchmentDefault defines a class SQLiteBuffer that uses SQLite to store logs.
273+
Parchment defines a class SQLiteBuffer that uses SQLite to store logs.
274274

275275
This implementation can be replaced by a class that is compatible with TrackingEventBuffer.

Sources/ParchmentDefault/DefaultBufferFlowController.swift renamed to Sources/Parchment/DefaultBufferFlowController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77

88
import Foundation
9-
import Parchment
109

1110
public final class DefaultBufferFlowController: BufferFlowController, Sendable {
1211
let pollingInterval: UInt

0 commit comments

Comments
 (0)