Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPM #97

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Xcode
build/
.build/
*.pbxuser
!default.pbxuser
*.mode1v3
Expand Down
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ os: osx
language: swift
xcode_project: MarkyMark.xcodeproj
xcode_scheme: markymark_Tests
osx_image: xcode10
osx_image: xcode11
podfile: Example/Podfile
before_install:
- gem install cocoapods # Since Travis is not always on latest version
- pod repo update
- pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -workspace Example/markymark.xcworkspace -scheme markymark-Example -destination 'platform=iOS Simulator,name=iPhone 8' | xcpretty
- swift build -Xswiftc "-sdk" -Xswiftc $(xcrun --sdk iphonesimulator --show-sdk-path) -Xswiftc "-target" -Xswiftc "x86_64-apple-ios13.0-simulator"
- set -o pipefail && xcodebuild test -workspace Example/markymark.xcworkspace -scheme markymark-Example -destination 'platform=iOS Simulator,name=iPhone 11' | xcpretty
# - pod lib lint
after_success:
- bash <(curl -s https://codecov.io/bash)
31 changes: 31 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version:5.0

import PackageDescription

let package = Package(
name: "Marky-Mark",
platforms: [
.iOS("8.0"),
],
products: [
.library(
name: "markymark",
targets: ["markymark"]),
],
dependencies: [],
targets: [
.target(
name: "markymark",
dependencies: [],
path: "markymark"),
// .target(
// name: "markymark_Example",
// dependencies: [],
// path: "Example"),
// .testTarget(
// name: "markymark_Tests",
// dependencies: [],
// path: "Example"),
],
swiftLanguageVersions: [.v4_2]
)
1 change: 1 addition & 0 deletions Sources
7 changes: 4 additions & 3 deletions markymark.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ Marky Mark is a parser written in Swift that converts markdown into native views
DESC

s.homepage = "https://github.com/M2Mobi/Marky-Mark"
s.license = 'MIT'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "M2Mobi" => "info@m2mobi.com" }
s.source = { :git => "https://github.com/M2Mobi/Marky-Mark.git", :tag => s.version.to_s }

s.ios.deployment_target = '8.0'
s.swift_version = '4.2'

s.source_files = 'markymark/Classes/**/*{.swift}'

s.source_files = 'markymark/Classes/**/*{.swift}'
s.ios.frameworks = 'UIKit'
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

@IBDesignable
open class MarkdownAttributedLabel: AttributedInteractiveLabel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

public enum MarkDownConfiguration {
case view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

public class DefaultURLOpener: URLOpener {

Expand All @@ -21,6 +22,10 @@ public class DefaultURLOpener: URLOpener {
}

public func open(url: URL) {
_ = sharedApplication?.openURL(url)
if #available(iOS 10, *) {
_ = sharedApplication?.open(url, options: [:], completionHandler: nil)
} else {
_ = sharedApplication?.openURL(url)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

class HeaderAttributedStringLayoutBlockBuilder: InlineAttributedStringLayoutBlockBuilder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

class ParagraphAttributedStringLayoutBlockBuilder: InlineAttributedStringLayoutBlockBuilder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

class QuoteAttributedStringLayoutBlockBuilder: InlineAttributedStringLayoutBlockBuilder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

class InlineAttributedStringLayoutBlockBuilder: LayoutBlockBuilder<NSMutableAttributedString> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import UIKit

public protocol LetterSpacingStylingRule: ItemStyling {
var letterSpacing: CGFloat? { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//

import Foundation
import UIKit

public protocol MinimumHeightStylingRule: ItemStyling {

Expand Down