Describe modules
This commit is contained in:
parent
32c82f8862
commit
9e1e8e2ec2
48
README.md
48
README.md
|
@ -8,4 +8,50 @@ Fuzzy sets and fuzzy logic theory implementations.
|
|||

|
||||
|
||||
[](https://github.com/allexks/FuzzyKit/actions/workflows/build-and-test.yml)
|
||||

|
||||

|
||||
|
||||
## 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
|
||||
```
|
Loading…
Reference in New Issue