Swiftpack.co -  rosberry/general as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
rosberry/general
Code generation for your modules
.package(url: "https://github.com/rosberry/general.git", from: "3.0")

General

New vision of source code generation. Allows to generate files and automatically add them to project hierarchy by the most easiest way. All you need is to get templates where already declared their place in progect hierarchy and specify spec file where provided default project target. Also you can specify other target if required right in command line.

Mint

Using

  1. Setup templates and spec:

    general setup [-r <templates repo> [-g]
    
  2. Create a module with one of installed templates:

    general -n main -t rsb_mvp_vm_module
    

Run general help to see available commands and options:

OVERVIEW: Generates code from templates.

USAGE: general <subcommand>

OPTIONS:
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  gen (default)           Generates modules from templates.
  create                  Creates a new template.
  list                    List of available templates.
  setup                   Provides your environment with templates
  config                  Provides an access to config file
  upgrade                 Upgrades general to specified version

Plugins

Now you can create your own executable file and place it under ~/.general/plugins. The only requirement - this file should provide --help option for it and each its public subcommands like swift ArgumentParser (see example above). General will find appropriate plugin by command line arguments semantic.

To learn more about the configuration file see the dedicated documentation.

Installing

  • Homebrew: brew install rosberry/tap/general
  • Mint: mint install rosberry/general
  • From source: make install

Authors

About

This project is owned and maintained by Rosberry. We build mobile apps for users worldwide 🌏.

Check out our open source projects, read our blog or give us a high-five on 🐦 @rosberryapps.

License

The project is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 5
Last commit: 5 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Independence Day
5 weeks ago

Implemented binary-based plugins system

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API