diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c69c7367..63c5c921 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,10 +16,10 @@ jobs: run: | set -ex sudo xcode-select --switch /Applications/Xcode_13.3.1.app/Contents/Developer/ - + brew install swiftwasm/tap/carton - carton bundle --product DOMKitDemo + carton bundle --product WebAPIKitDemo carton test --environment defaultBrowser env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/LICENSE b/LICENSE index 265a9c65..cdec2db8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 DOMKit contributors +Copyright (c) 2020 WebAPIKit contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Package.swift b/Package.swift index 891b5951..5ad07a0d 100644 --- a/Package.swift +++ b/Package.swift @@ -4,15 +4,15 @@ import PackageDescription let package = Package( - name: "DOMKit", + name: "WebAPIKit", products: [ .executable( - name: "DOMKitDemo", - targets: ["DOMKitDemo"] + name: "WebAPIKitDemo", + targets: ["WebAPIKitDemo"] ), .library( - name: "DOMKit", - targets: ["DOMKit"] + name: "WebAPIKit", + targets: ["WebAPIKit"] ), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), @@ -25,11 +25,11 @@ let package = Package( ], targets: [ .target( - name: "DOMKitDemo", - dependencies: ["DOMKit"] + name: "WebAPIKitDemo", + dependencies: ["WebAPIKit"] ), .target( - name: "DOMKit", + name: "WebAPIKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")] ), // This support library should be moved to JavaScriptKit @@ -43,8 +43,8 @@ let package = Package( dependencies: ["WebIDL"] ), .testTarget( - name: "DOMKitTests", - dependencies: ["DOMKit"] + name: "WebAPIKitTests", + dependencies: ["WebAPIKit"] ), ] ) diff --git a/Sources/DOMKit/Generated.swift b/Sources/WebAPIKit/Generated.swift similarity index 100% rename from Sources/DOMKit/Generated.swift rename to Sources/WebAPIKit/Generated.swift diff --git a/Sources/DOMKit/RotationMatrixType.swift b/Sources/WebAPIKit/RotationMatrixType.swift similarity index 100% rename from Sources/DOMKit/RotationMatrixType.swift rename to Sources/WebAPIKit/RotationMatrixType.swift diff --git a/Sources/DOMKit/Support.swift b/Sources/WebAPIKit/Support.swift similarity index 100% rename from Sources/DOMKit/Support.swift rename to Sources/WebAPIKit/Support.swift diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/WebAPIKitDemo/WebGLDemo.swift similarity index 98% rename from Sources/DOMKitDemo/WebGLDemo.swift rename to Sources/WebAPIKitDemo/WebGLDemo.swift index dfd80905..ad96f9e7 100644 --- a/Sources/DOMKitDemo/WebGLDemo.swift +++ b/Sources/WebAPIKitDemo/WebGLDemo.swift @@ -1,4 +1,4 @@ -// Copyright 2021-2022, GFXFundamentals and DOMKit contributors. +// Copyright 2021-2022, GFXFundamentals and WebAPIKit contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import DOMKit +import WebAPIKit let vertexShaderSource = """ diff --git a/Sources/DOMKitDemo/main.swift b/Sources/WebAPIKitDemo/main.swift similarity index 94% rename from Sources/DOMKitDemo/main.swift rename to Sources/WebAPIKitDemo/main.swift index dfe47211..38f61dd4 100644 --- a/Sources/DOMKitDemo/main.swift +++ b/Sources/WebAPIKitDemo/main.swift @@ -1,5 +1,5 @@ -import DOMKit import JavaScriptKit +import WebAPIKit let document = globalThis.document diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 1945e0f0..994d6d65 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -7,7 +7,7 @@ func main() { do { let startTime = Date() let idl = try IDLParser.parseIDL() - let outputPath = "Sources/DOMKit/Generated.swift" + let outputPath = "Sources/WebAPIKit/Generated.swift" var contents: [SwiftSource] = [] print("Generating bindings...") contents.append(try IDLBuilder.generateIDLBindings(idl: idl)) @@ -19,7 +19,8 @@ func main() { contents.append(try IDLBuilder.generateUnions()) try IDLBuilder.writeFile( path: outputPath, - content: contents.joined(separator: "\n\n").source) + content: contents.joined(separator: "\n\n").source + ) SwiftFormatter.run(source: outputPath) print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") diff --git a/Tests/DOMKitTests/DOMKitTests.swift b/Tests/WebAPIKitTests/WebAPIKitTests.swift similarity index 95% rename from Tests/DOMKitTests/DOMKitTests.swift rename to Tests/WebAPIKitTests/WebAPIKitTests.swift index 16cf7424..ec936d38 100644 --- a/Tests/DOMKitTests/DOMKitTests.swift +++ b/Tests/WebAPIKitTests/WebAPIKitTests.swift @@ -1,9 +1,9 @@ -import DOMKit import Foundation import JavaScriptKit +import WebAPIKit import XCTest -final class DOMKitTests: XCTestCase { +final class WebAPIKitTests: XCTestCase { func testQuerySelector() { let document = globalThis.document let button = document.createElement(localName: "button")