Last active
December 26, 2016 03:17
-
-
Save bannzai/96dd804e1d92830719491dda2fd6335e to your computer and use it in GitHub Desktop.
まだiOS Clean Architecture で消耗してるの? 爆速開発ツールを作ったのでご紹介 ref: http://qiita.com/bannzai/items/6e8add18b15af235a19f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kuri setup | |
created Kuri.yml. | |
created template for Entity | |
created template for DataStore | |
created template for Repository | |
created template for UseCase | |
created template for Translator | |
created template for Model | |
created template for Presenter | |
created template for View | |
created template for Wireframe | |
created template for Builder | |
Successfully setup! | |
$ ls | |
Kuri.yml KuriTemplate, YourProject YourProject.xcodeproj YourProjectTests YourProjectUITests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kuri generate Kuri | |
created: ./YourProject/Kuri/Entity/KuriEntity.swift | |
created: ./YourProject/Kuri/Entity/KuriEntityImpl.swift | |
created: ./YourProject/Kuri/DataStore/KuriDataStore.swift | |
created: ./YourProject/Kuri/DataStore/KuriDataStoreImpl.swift | |
created: ./YourProject/Kuri/Repository/KuriRepository.swift | |
created: ./YourProject/Kuri/Repository/KuriRepositoryImpl.swift | |
created: ./YourProject/Kuri/UseCase/KuriUseCase.swift | |
created: ./YourProject/Kuri/UseCase/KuriUseCaseImpl.swift | |
created: ./YourProject/Kuri/Translator/KuriTranslator.swift | |
created: ./YourProject/Kuri/Translator/KuriTranslatorImpl.swift | |
created: ./YourProject/Kuri/Model/KuriModel.swift | |
created: ./YourProject/Kuri/Model/KuriModelImpl.swift | |
created: ./YourProject/Kuri/Presenter/KuriPresenter.swift | |
created: ./YourProject/Kuri/Presenter/KuriPresenterImpl.swift | |
created: ./YourProject/Kuri/View/KuriViewController.swift | |
created: ./YourProject/Kuri/View/KuriViewControllerImpl.swift | |
created: ./YourProject/Kuri/Wireframe/KuriWireframe.swift | |
created: ./YourProject/Kuri/Wireframe/KuriWireframeImpl.swift | |
created: ./YourProject/Kuri/Builder/KuriBuilder.swift | |
created: ./YourProject/Kuri/Builder/KuriBuilderImpl.swift | |
write in project: YourProject.xcodeproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// __REPOSITORY__Impl.swift | |
// Kuri | |
// | |
// Created by __USERNAME__ on __DATE__. | |
// Copyright © 2016年 __USERNAME__. All rights reserved. | |
// | |
struct __REPOSITORY__Impl: __REPOSITORY__ { | |
private let dataStore: __DATASTORE__ | |
init( | |
dataStore: __DATASTORE__ | |
) { | |
self.dataStore = dataStore | |
} | |
func fetch() throws -> __ENTITY__ { | |
return try dataStore.fetch() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// __REPOSITORY__Impl.swift | |
// Kuri | |
// | |
// Created by __USERNAME__ on __DATE__. | |
// Copyright © 2016年 __USERNAME__. All rights reserved. | |
// | |
struct __REPOSITORY__Impl: __REPOSITORY__ { | |
private let dataStore: __DATASTORE__ | |
init( | |
dataStore: __DATASTORE__ | |
) { | |
self.dataStore = dataStore | |
} | |
func fetch() throws -> __ENTITY__ { | |
return try dataStore.fetch() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// KuriRepositoryImpl.swift | |
// Kuri | |
// | |
// Created by kingkong999yhirose on 2016/12/25. | |
// Copyright © 2016年 kingkong999yhirose. All rights reserved. | |
// | |
struct KuriRepositoryImpl: KuriRepository { | |
private let dataStore: KuriDataStore | |
init( | |
dataStore: KuriDataStore | |
) { | |
self.dataStore = dataStore | |
} | |
func fetch() throws -> KuriEntity { | |
return try dataStore.fetch() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// KuriRepositoryImpl.swift | |
// Kuri | |
// | |
// Created by kingkong999yhirose on 2016/12/25. | |
// Copyright © 2016年 kingkong999yhirose. All rights reserved. | |
// | |
struct KuriRepositoryImpl: KuriRepository { | |
private let dataStore: KuriDataStore | |
init( | |
dataStore: KuriDataStore | |
) { | |
self.dataStore = dataStore | |
} | |
func fetch() throws -> KuriEntity { | |
return try dataStore.fetch() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment