All Projects → AckeeCZ → tapestry

AckeeCZ / tapestry

Licence: MIT License
Generate and maintain Swift frameworks with support for Cocoapods, Carthage and SPM

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to tapestry

Taniwhatextfield
My first cocoapod framework
Stars: ✭ 26 (-59.37%)
Mutual labels:  swift-package-manager, swift-framework
Markdowngenerator
Swift library to programmatically generate Markdown output and files
Stars: ✭ 76 (+18.75%)
Mutual labels:  swift-package-manager, swift-framework
Swiftlyext
SwiftlyExt is a collection of useful extensions for Swift 3 standard classes and types 🚀
Stars: ✭ 31 (-51.56%)
Mutual labels:  swift-package-manager, swift-framework
EKAstrologyCalc
Astrology Calculator calculates moon's rise/set times, moon Age, moon phases and Zodiac Sign for location and time
Stars: ✭ 31 (-51.56%)
Mutual labels:  swift-package-manager, swift-framework
L10n Swift
Localization of the application with ability to change language "on the fly" and support for plural form in any language.
Stars: ✭ 177 (+176.56%)
Mutual labels:  swift-package-manager, swift-framework
Framelayoutkit
FrameLayoutKit is a super fast and easy to use autolayout kit
Stars: ✭ 53 (-17.19%)
Mutual labels:  swift-package-manager, swift-framework
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1743.75%)
Mutual labels:  swift-package-manager, swift-framework
Swift
🥇Swift基础知识大全,🚀Swift学习从简单到复杂,不断地完善与更新, 欢迎Star❤️,欢迎Fork, iOS开发者交流:①群:446310206 ②群:426087546
Stars: ✭ 1,377 (+2051.56%)
Mutual labels:  swift-package-manager, swift-framework
Simplycoreaudio
A Swift framework that aims to make Core Audio use less tedious in macOS
Stars: ✭ 167 (+160.94%)
Mutual labels:  swift-package-manager, swift-framework
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (+82.81%)
Mutual labels:  swift-package-manager, swift-framework
MLLineChart
A simple Line Chart Lib
Stars: ✭ 28 (-56.25%)
Mutual labels:  swift-package-manager, swift-framework
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (+10.94%)
Mutual labels:  swift-package-manager, swift-framework
YMFF
Feature management made easy.
Stars: ✭ 26 (-59.37%)
Mutual labels:  swift-package-manager, swift-framework
mini-swift
Minimal Flux architecture written in Swift.
Stars: ✭ 40 (-37.5%)
Mutual labels:  swift-package-manager
catbird
Mock server for UI tests
Stars: ✭ 32 (-50%)
Mutual labels:  swift-package-manager
vintage
[UNMAINTED] command-line tool to check for outdated Swift Package Manager dependencies
Stars: ✭ 33 (-48.44%)
Mutual labels:  swift-package-manager
mosaic-node-generator
Generate mosaic images in Node.
Stars: ✭ 25 (-60.94%)
Mutual labels:  generate
BetterMappable
Better Mappable through Property Wrappers using ObjectMapper
Stars: ✭ 26 (-59.37%)
Mutual labels:  swift-package-manager
RangeUISlider
📱 🔵➖🔵 An iOS range selection slider compatible with UIKit and SwiftUI. Developed using autolayout and highly customizable using IBDesignabled and IBInspectable or programmatically. It support also RTL (right to left) languages automatically out of the box.
Stars: ✭ 98 (+53.13%)
Mutual labels:  swift-framework
tapit-app
App which lets two people share their social media details by simply putting one phone on top of the other ("tapping"). Currently in development by Nikita Mounier.
Stars: ✭ 18 (-71.87%)
Mutual labels:  swift-package-manager

ackee|Tapestry Build Status

What's Tapestry 🤔

Tapestry helps you with creating and managing your Swift frameworks 💫

Do you want to easily create a Swift framework that supports Carthage, Cocoapods and SPM?

Or define your release steps in a type-safe way?

Well, look no further, tapestry shall help you with exactly that!

Projects Using Tapestry

Project Repository
XcodeProj tuist/XcodeProj
ACKategories AckeeCZ/ACKategories

If you are also leveraging Tapestry in your project, feel free to open a PR to include it in the list above.

These repositories can also serve as a great example configuration for your own projects.

Installation

Using mint

$ mint install AckeeCZ/tapestry

Using SPM

Add this to your Package.swift:

.package(url: "https://github.com/AckeeCZ/tapestry.git", .branch("master")),

Using Swift directly

$ git clone https://github.com/AckeeCZ/tapestry.git
$ cd tapestry
$ swift run tapestry

Setup release steps

To get you started with tapestry (if you did not generate your framework with it!), you can run

tapestry up

This will create a TapestryConfig.swift that you can then customize per your needs

To configure your release steps, run:

tapestry edit

This opens Xcode with easily editable TapestryConfig.swift.

The generated file will look like this:

import TapestryDescription

let config = TapestryConfig(release: Release(actions: [.pre(.docsUpdate),
                                                       .pre(.dependenciesCompatibility([.cocoapods, .carthage, .spm(.all)]))],
                                             add: ["README.md",
                                                   "YourLibraryName.podspec",
                                                   "CHANGELOG.md"],
                                             commitMessage: "Version \(Argument.version)",
                                             push: false))

You can see lower below how to configure the manifest to your needs.

Release Github Action

Just by adding a simple tapestry step .post(.githubRelease(owner: "owner", repository: "repository", assetPaths: ["build.zip"])) you can automate your whole release process with Github actions. If that sounds interesting to you, check out the action here

To then create a new release with github action, simply run tapestry github-release 0.0.1 and ... that's all! 🙂

Editing TapestryConfig

To edit the manifest, simply run tapestry edit. That will open Xcode project with that manifest, so you can easily edit the Swift file. You can use the documentation right in the new Xcode project or you can use the documentation below 👇

TapestryConfig

This currently only has one argument release, more will be added here

Release

The main component of the release process.

Property Description Type Optional Default
actions Your custom release steps, more about how you can define them below (see ReleaseAction) [ReleaseAction] No []
add Glob of your files that you want to add to git before releasing a version [String] Yes
commitMessage Commit message - use Argument.version in your string which will translate to the version you are releasing String No
push This option determines if the changes are committed at the end Bool No

Running tapestry release 0.0.7 also automatically tags the latest commit.

ReleaseAction

This type lets you define the individual actions.

Case Description
pre(tool: String, arguments: [String] = []) Runs before commiting and pushing. Runs the custom command from the root folder.
pre(_ predefinedAction: PredefinedAction) Runs before commiting and pushing. Runs a PredefinedAction, more on that below.
post(tool: String, arguments: [String] = []) Runs after commiting and pushing. Runs the custom command from the root folder.
post(_ predefinedAction: PredefinedAction) Runs after commiting and pushing. Runs a PredefinedAction, more on that below.

PredefinedAction

This is a set of predefined actions.

Case Description
githubRelease Creates a new release on github. If you specify assetPaths, the files at the paths will be uploaded along with the new Github release.
docsUpdate Updates version in your .podspec, README.md and adds it in CHANGELOG.md
dependenciesCompatibility([DependenciesManager]) Checks compatibility with given DependenciesManagers

Note that for docsUpdate your changelog must be in this format:

## Next

- your way of adding logs

## 1.0.0
....

Which will be changed to

## Next

## 1.0.1

- your way of adding logs

## 1.0.0
....

To change the version in your README.md, we use the latest tag in your git history.

You can also try out the individual actions:

tapestry run action docs-update 1.0.0
tapestry run action compatibilty spm carthage cocoapods

DependenciesManager

Let's you say what dependency managers you want to check compatibility for.

Case Description
cocoapods Runs compatibility check for Cocoapods
carthage Runs compatibility check for Carthage
spm(Platform) Runs compatibility check for SPM - define platform if you are using platform-specific libraries (eg UIKit)

Generating project

Screenshot

To generate your project, simply run:

tapestry init --path TapestryProject

You can omit --path argument and it will generate your framework in the current directory.

It uses tuist and SPM tools, so it's very easy to adjust it to your needs (no complicated template structure, all code is generated from the ground up!)

You can change the generated files in InitCommand and your example project in ExampleModelLoader. In the future, I'd like to make this customization even easier, so watch this space 👀

Generated project features

  • CocoaPods, Carthage and Swift Package Manager compatibility
  • README.md template
  • travis to automate your builds
  • Library support
  • Executable support for your CLI tools
  • more and even more to come!

You can check out an example project that was generated with tapestry here.

Releasing project

Screenshot

Inspiration and thanks

I'd like to thank tuist for inspiration and help in this project. This project was also inspired by rocket

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].