diff --git a/Makefile b/Makefile index 63f4882..3127c7b 100644 --- a/Makefile +++ b/Makefile @@ -7,5 +7,9 @@ install: cp -r templates/*.xctemplate "$(ROOT_DIR)" uninstall: - rm -rf "$(ROOT_DIR)"/*.xctemplate + rm -rf "$(ROOT_DIR)"/Spec\ File\ for\ TCA.xctemplate + rm -rf "$(ROOT_DIR)"/TCA\ Service.xctemplate + rm -rf "$(ROOT_DIR)"/TCA\ Feature.xctemplate + rm -rf "$(ROOT_DIR)"/TCA\ with\ ReducerProtocol.xctemplate + rm -rf "$(ROOT_DIR)"/Swift\ Files\ for\ TCA.xctemplate diff --git a/Quick_knowhow.md b/Quick_howto.md similarity index 91% rename from Quick_knowhow.md rename to Quick_howto.md index 9e6c558..9fe5294 100644 --- a/Quick_knowhow.md +++ b/Quick_howto.md @@ -9,14 +9,6 @@ * Components * Spec -## How to install - -```sh -❯ git clone git@github.com:riiid/xctemplate-for-tca.git -❯ cd xctemplate-for-tca -❯ make -``` - ## Usage 1. Create a new group diff --git a/readme.md b/readme.md index f72ee74..6dde53c 100644 --- a/readme.md +++ b/readme.md @@ -6,7 +6,16 @@ ## List of templates -* [TCA feature](https://github.com/riiid/xctemplate-for-tca/blob/main/tca_knowhow.md) -* [Spec for TCA feature](https://github.com/riiid/xctemplate-for-tca/blob/main/Quick_knowhow.md) +* [TCA feature](https://github.com/riiid/xctemplate-for-tca/blob/main/tca_howto.md) +* [Spec for TCA feature](https://github.com/riiid/xctemplate-for-tca/blob/main/Quick_howto.md) +* TCA Service [TCA]: https://github.com/pointfreeco/swift-composable-architecture + +## How to install + +```sh +❯ git clone git@github.com:riiid/xctemplate-for-tca.git +❯ cd xctemplate-for-tca +❯ make +``` diff --git a/tca_knowhow.md b/tca_howto.md similarity index 88% rename from tca_knowhow.md rename to tca_howto.md index 8d06dd3..97dbf7d 100644 --- a/tca_knowhow.md +++ b/tca_howto.md @@ -13,14 +13,6 @@ * State * View(with Store) -## How to install - -```sh -❯ git clone git@github.com:riiid/xctemplate-for-tca.git -❯ cd xctemplate-for-tca -❯ make -``` - ## Usage 1. Create a new group @@ -33,7 +25,7 @@ ![image](https://user-images.githubusercontent.com/46320390/226542472-dc9a625c-ea71-4a20-bf52-82db3d46d7b0.png) -5. Set a coremodule name that you want +5. Set a feature name that you want 6. Next ![image](https://user-images.githubusercontent.com/46320390/226542550-5e26ab13-3533-4492-af34-d113aaa791f3.png) diff --git a/templates/Spec File for TCA.xctemplate/___FILEBASENAME___Spec.swift b/templates/Spec File for TCA.xctemplate/___FILEBASENAME___Spec.swift index 71acd55..7336364 100644 --- a/templates/Spec File for TCA.xctemplate/___FILEBASENAME___Spec.swift +++ b/templates/Spec File for TCA.xctemplate/___FILEBASENAME___Spec.swift @@ -7,13 +7,7 @@ import Quick @testable import ___VARIABLE_productName:identifier___ -typealias Test___VARIABLE_productName:identifier___Store = TestStore< - ___VARIABLE_productName:identifier___.State, - ___VARIABLE_productName:identifier___.Action, - ___VARIABLE_productName:identifier___.State, - ___VARIABLE_productName:identifier___.Action, - Void -> +typealias Test___VARIABLE_productName:identifier___Store = TestStoreOf<___VARIABLE_productName:identifier___> final class ___FILEBASENAMEASIDENTIFIER___: QuickSpec { private let scheduler: TestSchedulerOf = DispatchQueue.test diff --git a/templates/TCA with ReducerProtocol.xctemplate/TemplateIcon.png b/templates/TCA Feature.xctemplate/TemplateIcon.png similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/TemplateIcon.png rename to templates/TCA Feature.xctemplate/TemplateIcon.png diff --git a/templates/TCA with ReducerProtocol.xctemplate/TemplateIcon@2x.png b/templates/TCA Feature.xctemplate/TemplateIcon@2x.png similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/TemplateIcon@2x.png rename to templates/TCA Feature.xctemplate/TemplateIcon@2x.png diff --git a/templates/TCA with ReducerProtocol.xctemplate/TemplateInfo.plist b/templates/TCA Feature.xctemplate/TemplateInfo.plist similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/TemplateInfo.plist rename to templates/TCA Feature.xctemplate/TemplateInfo.plist diff --git a/templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___+Action.swift b/templates/TCA Feature.xctemplate/___FILEBASENAME___+Action.swift similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___+Action.swift rename to templates/TCA Feature.xctemplate/___FILEBASENAME___+Action.swift diff --git a/templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___+State.swift b/templates/TCA Feature.xctemplate/___FILEBASENAME___+State.swift similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___+State.swift rename to templates/TCA Feature.xctemplate/___FILEBASENAME___+State.swift diff --git a/templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___.swift b/templates/TCA Feature.xctemplate/___FILEBASENAME___.swift similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___.swift rename to templates/TCA Feature.xctemplate/___FILEBASENAME___.swift diff --git a/templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___View.swift b/templates/TCA Feature.xctemplate/___FILEBASENAME___View.swift similarity index 100% rename from templates/TCA with ReducerProtocol.xctemplate/___FILEBASENAME___View.swift rename to templates/TCA Feature.xctemplate/___FILEBASENAME___View.swift