Describe modules

This commit is contained in:
Alexander Ignatov 2022-01-03 13:22:03 +02:00
parent 32c82f8862
commit 9e1e8e2ec2
1 changed files with 47 additions and 1 deletions

View File

@ -8,4 +8,50 @@ Fuzzy sets and fuzzy logic theory implementations.
![Swift Package Manager supported](https://img.shields.io/badge/SWIFT%20PACKAGE%20MANAGER-SUPPORTED-green?style=for-the-badge&logo=SWIFT)
[![Build & Test](https://github.com/allexks/FuzzyKit/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/allexks/FuzzyKit/actions/workflows/build-and-test.yml)
![License](https://img.shields.io/github/license/allexks/FuzzyKit)
![License](https://img.shields.io/github/license/allexks/FuzzyKit)
## Modules
Using the Swift Package Manager, don't forget to add the package as a dependency to your `Package.swift` file:
```diff
dependencies: [
+ .package(url: "https://github.com/allexks/FuzzyKit", .upToNextMajor(from: "0.1.0")),
],
```
To be able to use everything from this package, you can import everything at once using this helper module:
```diff
.target(
name: "...",
dependencies: [
+ .product(name: "FuzzyKit", package: "FuzzyKit"),
]
),
```
```swift
import FuzzyKit
```
Or alternatively, import only the specific modules needed:
```diff
.target(
name: "...",
dependencies: [
+ .product(name: "FuzzySets", package: "FuzzyKit"),
+ .product(name: "FuzzyNumbers", package: "FuzzyKit"),
+ .product(name: "FuzzyRelations", package: "FuzzyKit"),
+ .product(name: "FuzzyLogic", package: "FuzzyKit"),
]
),
```
```swift
import FuzzySets
import FuzzyNumbers
import FuzzyRelations
import FuzzyLogic
```