Giter Club home page Giter Club logo

ccios's Introduction

ccios

Xcode File Generator for Clean Code architecture

How to install

gem install ccios

To build it from source:

cd ccios
gem build ccios.gemspec
gem install ./ccios-x.x.x.gem

To run the tests run: rake test

How to use

Go to your .xcodeproj folder cd /paht/to/my/xcodeproj. Then generate files with prefix Example:

ccios [-p|-i|-r|-c] Example [-d]

Generated templates can be found here

-p

-p stands for presenter

This generates 4 files: ExampleViewController, ExampleViewContract, ExamplePresenter, ExamplePresenterImplementation. If the -d option is supplied the protocol ExamplePresenterDelegate will be generated.

What's more it prints the code you need to add to DependencyProvider.swift and PresenterAssembly.swift for dependency injection.

The following structure is created for you in the Xcode project:

.
+-- App/
|   +-- Example/
|   |   +-- UI/
|   |   |   +-- View/
|   |   |   +-- ViewController/
|   |   |   |   +-- ExampleViewController
|   |   |   +-- ExampleViewContract
|   |   +-- Presenter/
|   |   |   +-- ExamplePresenter
|   |   |   +-- ExamplePresenterImplementation
|   |   +-- Model/

-i

-i stands for interactor

This generates 2 files: ExampleInteractor and ExampleInteractorImplementation.

What's more it prints the code you need to add to InteractorAssembly.swift for dependency injection.

The following structure is created for you in the Xcode project:

.
+-- Core/
|   +-- Interactor/
|   |   +-- ExampleInteractor/
|   |   |   +-- ExampleInteractor
|   |   |   +-- ExampleInteractorImplementation

-r

-r stands for repository

This generates 2 files: ExampleRepository and ExampleRepositoryImplementation.

What's more it prints the code you need to add to RepositoryAssembly.swift for dependency injection.

The following structure is created for you in the Xcode project:

.
+-- Core/
|   +-- Data/
|   |   +-- Example
|   |   |   +-- ExampleRepository
+-- Data/
|   +-- Example
|   |   +-- ExampleRepositoryImplementation

-c

-c stands for coordinator

This generates one file: ExampleCoordinator. If the -d option is supplied the protocol ExampleCoordinatorDelegate will be generated.

The following structure is created for you in the Xcode project:

.
+-- Coordinator/
|   +-- ExampleCoordinator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.