Skip to content

Commit 271ef41

Browse files
WebIDLToSwift: Generate single file to make output filenames predictable (#19)
* WebIDLToSwift: Generate into a single file to make the output filenames predictable * Split DOM related support code and generic support snippet * Stop cleaning up generated directory * Format only Generated.swift * Move Sources/DOMKit/WebIDL/*.swift to Sources/DOMKit/ * Move hardcoded output path to main.swift
1 parent 7ebda4b commit 271ef41

File tree

461 files changed

+18556
-20332
lines changed

Some content is hidden

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

461 files changed

+18556
-20332
lines changed

Package.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ let package = Package(
2626
dependencies: ["DOMKit"]),
2727
.target(
2828
name: "DOMKit",
29-
dependencies: ["JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]),
29+
dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]),
30+
// This support library should be moved to JavaScriptKit
31+
.target(name: "ECMAScript", dependencies: [
32+
"JavaScriptKit",
33+
.product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]),
3034
.target(name: "WebIDL"),
3135
.target(
3236
name: "WebIDLToSwift",

Sources/DOMKit/Generated.swift

+18,510
Large diffs are not rendered by default.

Sources/DOMKit/ECMAScript/Support.swift renamed to Sources/DOMKit/Support.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import JavaScriptKit
2+
@_exported import ECMAScript
23

34
/* TODO: fix this */
45
public typealias __UNSUPPORTED_BIGINT__ = JSValue

Sources/DOMKit/WebIDL/ARIAMixin.swift

-212
This file was deleted.

Sources/DOMKit/WebIDL/AbortController.swift

-27
This file was deleted.

Sources/DOMKit/WebIDL/AbortSignal.swift

-39
This file was deleted.

Sources/DOMKit/WebIDL/AbstractRange.swift

-34
This file was deleted.

Sources/DOMKit/WebIDL/AbstractWorker.swift

-12
This file was deleted.

Sources/DOMKit/WebIDL/AddEventListenerOptions.swift

-30
This file was deleted.

Sources/DOMKit/WebIDL/Animatable.swift

-17
This file was deleted.

0 commit comments

Comments
 (0)