Skip to content

Commit

Permalink
feat: spm
Browse files Browse the repository at this point in the history
  • Loading branch information
EyreFree committed Jun 30, 2021
1 parent 77ed4b3 commit f6a4711
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ Carthage
# `pod install` in .travis.yml
#
# Pods/

# SPM
.build
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

-----

## [5.1.4](https://github.com/EFPrefix/EFCountingLabel/releases/tag/5.1.4) (2021-06-30)

* Support SPM.

---

## [5.1.3](https://github.com/EFPrefix/EFCountingLabel/releases/tag/5.1.3) (2021-06-20)

* Compiler error "Ambiguous use of 'pow'" in xCode beta. [#32](https://github.com/EFPrefix/EFCountingLabel/pull/32)
Expand Down
2 changes: 1 addition & 1 deletion EFCountingLabel.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'EFCountingLabel'
s.version = '5.1.3'
s.version = '5.1.4'
s.summary = 'A label which can show number change animated.'

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// swift-tools-version:5.1
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "EFCountingLabel",
platforms: [
.iOS(.v10),
.iOS(.v8),
],
products: [
.library(name: "EFCountingLabel", targets: ["EFCountingLabel"]),
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<a href="https://travis-ci.org/EFPrefix/EFCountingLabel">
<img src="https://img.shields.io/travis/EFPrefix/EFCountingLabel.svg">
</a>
<a href="https://swiftpackageindex.com/EFPrefix/EFCountingLabel">
<img src="https://img.shields.io/badge/SPM-ready-orange.svg">
</a>
<a href="https://cocoapods.org/pods/EFCountingLabel">
<img src="https://img.shields.io/cocoapods/v/EFCountingLabel.svg?style=flat">
</a>
Expand Down Expand Up @@ -47,12 +50,27 @@ To run the example project, clone the repo, and run `pod install` from the Examp

## Installation

### CocoaPods

EFCountingLabel is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'EFCountingLabel'
```

### Swift Package Manager

The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the Swift compiler.

Once you have your Swift package set up, adding EFCountingLabel as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```swift
dependencies: [
.package(url: "https://github.com/EFPrefix/EFCountingLabel.git", .upToNextMinor(from: "5.1.4"))
]
```

## Setup

Simply initialize a `EFCountingLabel` the same way you set up a regular `UILabel`:
Expand Down
17 changes: 17 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<a href="https://travis-ci.org/EFPrefix/EFCountingLabel">
<img src="https://img.shields.io/travis/EFPrefix/EFCountingLabel.svg">
</a>
<a href="https://swiftpackageindex.com/EFPrefix/EFCountingLabel">
<img src="https://img.shields.io/badge/SPM-ready-orange.svg">
</a>
<a href="https://cocoapods.org/pods/EFCountingLabel">
<img src="https://img.shields.io/cocoapods/v/EFCountingLabel.svg?style=flat">
</a>
Expand Down Expand Up @@ -58,6 +61,8 @@ git clone [email protected]:EFPrefix/EFCountingLabel.git; cd EFCountingLabel/Exampl

## 安装

### CocoaPods

EFCountingLabel 可以通过 [CocoaPods](https://cocoapods.org) 进行获取。只需要在你的 Podfile 中添加如下代码就能实现引入:

```ruby
Expand All @@ -70,6 +75,18 @@ pod 'EFCountingLabel'
pod install
```

### Swift Package Manager

[Swift Package Manager](https://swift.org/package-manager/) 是一个集成在 Swift 编译器中的用来进行 Swift 代码自动化发布的工具。

如果你已经建立了你的 Swift 包,将 EFCountingLabel 加入依赖是十分容易的,只需要将其添加到你的 `Package.swift` 文件的 `dependencies` 项中即可:

```swift
dependencies: [
.package(url: "https://github.com/EFPrefix/EFCountingLabel.git", .upToNextMinor(from: "5.1.4"))
]
```

## 设置

初始化 `EFCountingLabel` 的方式和普通的 `UILabel` 是一样的:
Expand Down

0 comments on commit f6a4711

Please sign in to comment.