From 47d06b3f650867afd0a1fa8379d5b590855246db Mon Sep 17 00:00:00 2001 From: damien Date: Sat, 16 Nov 2019 19:55:18 +0100 Subject: [PATCH] Support SPM Amend Amend Amend --- Package.swift | 40 +++++++++++++++++++++++++ Source/JSON.swift | 2 ++ Source/JSONKey.swift | 3 ++ Source/Properties.swift | 3 ++ Source/Supporting Files/Utilities.swift | 2 ++ 5 files changed, 50 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..3c12786 --- /dev/null +++ b/Package.swift @@ -0,0 +1,40 @@ +// swift-tools-version:5.0 +// +// JSON.swift +// +// Copyright (c) 2015-2019 Damien (http://delba.io) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "JASON", + products: [ + .library( + name: "JASON", + targets: ["JASON"]), + ], + targets: [ + .target( + name: "JASON", + path: "Source") + ] +) diff --git a/Source/JSON.swift b/Source/JSON.swift index 6d3cdb9..d8e636a 100644 --- a/Source/JSON.swift +++ b/Source/JSON.swift @@ -22,6 +22,8 @@ // SOFTWARE. // +import Foundation + // MARK: - Initializers public struct JSON { diff --git a/Source/JSONKey.swift b/Source/JSONKey.swift index 920c321..3142d4f 100644 --- a/Source/JSONKey.swift +++ b/Source/JSONKey.swift @@ -22,6 +22,9 @@ // SOFTWARE. // +import Foundation +import CoreGraphics + // MARK: - JSONKey private enum KeyType { diff --git a/Source/Properties.swift b/Source/Properties.swift index 7ef1290..fb887a6 100644 --- a/Source/Properties.swift +++ b/Source/Properties.swift @@ -22,6 +22,9 @@ // SOFTWARE. // +import Foundation +import CoreGraphics + // MARK: - JSON extension JSON { diff --git a/Source/Supporting Files/Utilities.swift b/Source/Supporting Files/Utilities.swift index 383fe50..f5f2c07 100644 --- a/Source/Supporting Files/Utilities.swift +++ b/Source/Supporting Files/Utilities.swift @@ -22,6 +22,8 @@ // SOFTWARE. // +import Foundation + internal extension NSArray { /** Returns the element at the given index or nil if the index is out of bounds.