Skip to content

Commit

Permalink
Rename package to WebAPIKit (#39)
Browse files Browse the repository at this point in the history
Resolves #22.
  • Loading branch information
MaxDesiatov authored May 4, 2022
1 parent 1d0bf58 commit d8d0b1b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 10 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"]),
Expand All @@ -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
Expand All @@ -43,8 +43,8 @@ let package = Package(
dependencies: ["WebIDL"]
),
.testTarget(
name: "DOMKitTests",
dependencies: ["DOMKit"]
name: "WebAPIKitTests",
dependencies: ["WebAPIKit"]
),
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 =
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DOMKit
import JavaScriptKit
import WebAPIKit

let document = globalThis.document

Expand Down
5 changes: 3 additions & 2 deletions Sources/WebIDLToSwift/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit d8d0b1b

Please sign in to comment.