Skip to content

Commit

Permalink
Improve documentation with instructions on how to integrate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Sep 12, 2023
1 parent eb3e3ba commit 9605dee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

# Foundation

This framework simply consists of the files [AppFoundation.swift](https://github.com/FlineDev/Foundation/blob/main/Sources/AppFoundation/AppFoundation.swift) and [TestFoundation.swift](https://github.com/FlineDev/Foundation/blob/main/Sources/TestFoundation/TestFoundation.swift) which contains just a collection of `@_exported import` statements of frameworks I use in every new app.
This framework simply consists of the files [AppFoundation.swift](https://github.com/FlineDev/Foundation/blob/main/Sources/AppFoundation/AppFoundation.swift) and [TestFoundation.swift](https://github.com/FlineDev/Foundation/blob/main/Sources/TestFoundation/TestFoundation.swift) which contain just a collection of `@_exported import` statements of frameworks I use in every new app.

## Usage

Simply import `AppFoundation` or `TestFoundation` in your app or test targets Swift files and you no longer need to import `Foundation`, `SwiftUI`, `SwiftData`, `OSLog`, and a couple of other frameworks to eliminate the need for repeated imports. This serves a very similar purpose like the `import Foundation` Apple adds to every new Swift file by default, which is why I named this after that.
Just add `https://github.com/FlineDev/Foundation.git` as a Swift package, referencing the `main` branch and let Xcode load all commonly used dependencies.

You are free to reference the `main` branch of this framework as-is in your app, but note that I tend to use the latest Swift tools version at all times and that I might be adding or replacing frameworks over time without notice. So you might prefer to fork it and adjust it to your needs. That's mostly why I made this public.
Then, simply import `AppFoundation` or `TestFoundation` in your app or test targets Swift files and you no longer need to import `Foundation`, `SwiftUI`, `SwiftData`, `OSLog`, and a couple of other frameworks to eliminate the need for repeated imports. This serves a very similar purpose like the `import Foundation` Apple adds to every new Swift file by default, which is why I named this after that.

You are free to reference this framework as-is in your app, but note that I tend to use the latest Swift tools version at all times and that I might be adding or replacing frameworks over time without notice. So you might prefer to fork it and adjust it to your needs instead. That's mostly why I made this public.

## License

Expand Down

0 comments on commit 9605dee

Please sign in to comment.