All Projects → bitomule → SwiftyPods

bitomule / SwiftyPods

Licence: MIT license
Type safe pods

Programming Languages

swift
15916 projects
Makefile
30231 projects

Projects that are alternatives of or similar to SwiftyPods

Chaos
The Chaos Programming Language
Stars: ✭ 171 (+1040%)
Mutual labels:  typesafe
CSV
A simple CSV file parser and serializer
Stars: ✭ 31 (+106.67%)
Mutual labels:  spm
SwiftZip
Swift wrapper for libzip — library for reading, creating, and modifying zip archives.
Stars: ✭ 44 (+193.33%)
Mutual labels:  spm
Flowkit
A declarative type-safe framework for building fast and flexible list with Tables & Collection
Stars: ✭ 215 (+1333.33%)
Mutual labels:  typesafe
SwiftMark
[⚠️Not a complete implementation] A Markdown renderer written in Swift.
Stars: ✭ 77 (+413.33%)
Mutual labels:  spm
Table
CLI tables in Swift
Stars: ✭ 53 (+253.33%)
Mutual labels:  spm
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (+833.33%)
Mutual labels:  typesafe
TIFeedParser
RSS Parser written in Swift
Stars: ✭ 18 (+20%)
Mutual labels:  spm
SupportEmail
Pre-populates emails with support information in iOS/iPadOS apps
Stars: ✭ 20 (+33.33%)
Mutual labels:  spm
CircularProgressView
Circular and animated progress bar for iOS
Stars: ✭ 25 (+66.67%)
Mutual labels:  spm
flutter firestore ref
Cross-platform(including web) Firestore type-safe wrapper.
Stars: ✭ 72 (+380%)
Mutual labels:  typesafe
swift-watch
Watches over your Swift project's source
Stars: ✭ 43 (+186.67%)
Mutual labels:  spm
SwiftDown
📦 A themable markdown editor component for your SwiftUI apps.
Stars: ✭ 203 (+1253.33%)
Mutual labels:  spm
Vuex Class Component
A Type Safe Vuex Module or Store Using ES6 Classes and ES7 Decorators written in TypeScript.
Stars: ✭ 189 (+1160%)
Mutual labels:  typesafe
swift-declarative-configuration
Declarative configuration for your objects
Stars: ✭ 46 (+206.67%)
Mutual labels:  spm
Typedapi
Build your web API on the type level.
Stars: ✭ 165 (+1000%)
Mutual labels:  typesafe
Thread
type safe multi-threading made easier
Stars: ✭ 34 (+126.67%)
Mutual labels:  typesafe
Rocket
Define your release steps 🚀
Stars: ✭ 99 (+560%)
Mutual labels:  spm
trace-cocoa-sdk
Catch bugs before they reach production — get detailed crash reports and monitor how your app is performing across the entire install base.
Stars: ✭ 15 (+0%)
Mutual labels:  spm
Match3Kit
Library for simple Match3 games.
Stars: ✭ 38 (+153.33%)
Mutual labels:  spm

Swift

Swift Package Manager Mac + Linux Twitter: @bitomule

SwiftyPods

SwiftyPods is a command-line tool that allows you to generate your CocoaPods podfile using Swift. It uses SwiftyPodsDSL as syntax.

Motivation

Reading and editing the podfile becomes impossible when your project based on CocoaPods grows. You start grouping using variables and comments but it's still a long file where the safety is the error you get when you run pod install.

SwiftyPods enables two big features:

  • Safety: Swift will type check your file before you finish editing it.
  • Modularization of your podfile: You can split your podfile in multiple podfile.swift files. You choose: feature pods, module pods, team pods... Once you generate your podfile they will all get merged into a single, classic podfile.

This is what your podfile.swift will look like

let podfile = Podfile(
    targets: [
        .target(
            name: "Target",
            project: "Project",
            dependencies: [
                .dependency(name: "Dependency1"),
                .dependency(name: "Dependency2",
                            version: "1.2.3"),
                .dependency(name: "Dependency3",
                            .git(url: "repo"),
                            .branch(name: "master"))
            ],
            childTargets: [
                .target(name: "ChildTarget", project: "Project2")
            ]
        )
    ]
)

Installing

Using Homebrew

$ brew install bitomule/homebrew-tap/swiftypods

Using Mint

$ mint install bitomule/swiftypods

Compiling from source

$ git clone https://github.com/bitomule/SwiftyPods.git
$ cd SwiftyPods
$ make install

Usage

Create your first empty podfile

You can create an empty podfile.swift using the create command:

$ swiftypods create

It takes an optional path parameter that you can use to create your podfile at an specific location:

$ swiftypods create --path "path/to/folder"

Once the file is created you can jump directly to editing.

Editing

You can open your podfile.swift anytime and edit it, but if you want to use the power of the Swift compiler and autocomplete use:

$ swiftypods edit

This command will:

  1. Find all your podfile.swift files inside the folder
  2. Create a temporal Xcode project inside tmp folder
  3. Open that project for you

Once the project is opened you can edit your files content.

When you have finished editing just close the Xcode project, go back to terminal and press any key. This will copy your templates back to original locations and delete temporal folder. Keep in mind that SwiftyPods has to copy edited files back to original locations. If you don't complete the terminal process, your podfiles won't be updated.

Generating podfile

In order to generate your podfile just run:

$ swiftypods generate

By default it will use an almost empty podfile template but you can use your own template using:

$ swiftypods generate --template "templateLocation"

The only thing your template needs to follow is adding {{pods}} where you want your dependencies to get generated. Base podfile template is:

platform :ios, '13.0'
inhibit_all_warnings!

{{pods}}

Use your own template to add features not supported by SwiftyPods like hooks or plugins.

Contributions and support

Contributions are more than welcome.

Before you start using SwiftyPods, please take a few minutes to check the implementation so you can identify issues or missing features.

Keep in mind this is a very experimental project, expect breaking changes.

This project does not come with Github Issues enabled. If you find an issue, missing feature or missing documentation please open a Pull Request. Your PR could just contain a draft of the changes you plan to do or a test that reproduces the issue so we can start the discussion there.

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].