Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 069587d

Browse files
committed
Removed MarkupCore dependency
1 parent 7126196 commit 069587d

File tree

10 files changed

+31
-21
lines changed

10 files changed

+31
-21
lines changed

Package.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ let package = Package(
77
.library(name: "CSSKit", targets: ["CSSKit"]),
88
],
99
dependencies: [
10-
.package(url: "https://github.com/MakeupStudio/MarkupCore.git",
11-
from: "1.0.0-alpha.2.0"),
1210
.package(url: "https://github.com/MakeupStudio/Palette.git",
1311
from: "2.0.0")
1412
],
1513
targets: [
1614
.target(
1715
name: "CSSKit",
18-
dependencies: ["MarkupCore", "Palette"]),
16+
dependencies: ["Palette"]),
1917
.testTarget(
2018
name: "CSSKitTests",
2119
dependencies: ["CSSKit"]),

Sources/CSSKit/Assets/Fonts/WebFont.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright © 2019 MakeupStudio. All rights reserved.
77
//
88

9-
import MarkupCore
10-
119
extension Font.Weight: Renderable {
1210
public func render() -> String { .init(rawValue) }
1311
}

Sources/CSSKit/Measurements/Dimensions/CSSDimension.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
// Copyright © 2019 MakeupStudio. All rights reserved.
77
//
88

9-
import MarkupCore
10-
119
public enum Dimension {
1210
public typealias Erased = ErasedDimension
1311
}
1412

15-
public protocol CSSDimension: ErasableType where Erased == ErasedDimension {
13+
public protocol CSSDimension: Erasable where Erased == ErasedDimension {
1614

1715
associatedtype Unit: CSSUnit
1816
var value: Double { get }

Sources/CSSKit/Measurements/Dimensions/CSSUnit.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
// Copyright © 2019 MakeupStudio. All rights reserved.
77
//
88

9-
import MarkupCore
10-
11-
public protocol CSSUnit: RawRepresentable, ErasableType
9+
public protocol CSSUnit: RawRepresentable, Erasable
1210
where RawValue == String, Erased == ErasedUnit {}
1311

1412
extension CSSUnit {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// Erasable.swift
3+
// CSSKit
4+
//
5+
// Created by Maxim Krouk on 4/21/20.
6+
//
7+
8+
public protocol Erasable {
9+
associatedtype Erased
10+
var erased: Erased { get }
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// Renderable.swift
3+
// CSSKit
4+
//
5+
// Created by Maxim Krouk on 4/21/20.
6+
//
7+
8+
import Foundation
9+
10+
public protocol Renderable {
11+
func render() -> String
12+
}

Sources/CSSKit/Selectors/Selector+Init.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
//
6363
//extension Selector where Kind == CSS.SelectorKind.Group {
6464
//
65-
// public init<T: ErasableType>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
65+
// public init<T: Erasable>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
6666
// rawValue = other.reduce(into: first.erased.rawValue + Kind.prefixed(name: second.erased.rawValue)) {
6767
// $0 += Kind.prefixed(name: $1.erased.rawValue)
6868
// }
@@ -72,7 +72,7 @@
7272
//
7373
//extension Selector where Kind == CSS.SelectorKind.Descendant {
7474
//
75-
// public init<T: ErasableType>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
75+
// public init<T: Erasable>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
7676
// rawValue = other.reduce(into: first.erased.rawValue + Kind.prefixed(name: second.erased.rawValue)) {
7777
// $0 += Kind.prefixed(name: $1.erased.rawValue)
7878
// }
@@ -82,7 +82,7 @@
8282
//
8383
//extension Selector where Kind == CSS.SelectorKind.Child {
8484
//
85-
// public init<T: ErasableType>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
85+
// public init<T: Erasable>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
8686
// rawValue = other.reduce(into: first.erased.rawValue + Kind.prefixed(name: second.erased.rawValue)) {
8787
// $0 += Kind.prefixed(name: $1.erased.rawValue)
8888
// }
@@ -92,7 +92,7 @@
9292
//
9393
//extension Selector where Kind == CSS.SelectorKind.Adjacent {
9494
//
95-
// public init<T: ErasableType>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
95+
// public init<T: Erasable>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
9696
// rawValue = other.reduce(into: first.erased.rawValue + Kind.prefixed(name: second.erased.rawValue)) {
9797
// $0 += Kind.prefixed(name: $1.erased.rawValue)
9898
// }
@@ -102,7 +102,7 @@
102102
//
103103
//extension Selector where Kind == CSS.SelectorKind.General {
104104
//
105-
// public init<T: ErasableType>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
105+
// public init<T: Erasable>(_ first: T, _ second: T, _ other: T...) where T.Erased == CSS.ErasedSelector {
106106
// rawValue = other.reduce(into: first.erased.rawValue + Kind.prefixed(name: second.erased.rawValue)) {
107107
// $0 += Kind.prefixed(name: $1.erased.rawValue)
108108
// }

Sources/CSSKit/Styles/Enums/Transform/Style+Transform.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright © 2019 MakeupStudio. All rights reserved.
77
//
88

9-
import MarkupCore
10-
119
extension Style {
1210

1311
public static func transform(_ function: TransformFunction?) -> Self {

Sources/CSSKit/Styles/Style.swift

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

99
import Foundation
10-
import MarkupCore
1110

1211
public struct Style: Renderable {
1312
public var key: String

Sources/CSSKit/Styles/StylesCollection.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright © 2019 MakeupStudio. All rights reserved.
77
//
88

9-
import MarkupCore
10-
119
public typealias StylesCollection = [Style]
1210

1311
extension StylesCollection: Renderable {

0 commit comments

Comments
 (0)