From 1d5d2577969ddea28afc70458b6ab1f4070d88d4 Mon Sep 17 00:00:00 2001 From: Elon Date: Sat, 24 Aug 2019 00:06:15 +0900 Subject: [PATCH 1/6] :bug: error fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f97a519..1a7fdbb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ all: - mkdir -p $HOME/Library/Developer/Xcode/UserData/CodeSnippets + mkdir -p $$HOME/Library/Developer/Xcode/UserData/CodeSnippets rm $$HOME/Library/Developer/Xcode/UserData/CodeSnippets/ReactorKit*.codesnippet 2>/dev/null || true cp ./CodeSnippets/* $$HOME/Library/Developer/Xcode/UserData/CodeSnippets From 283018dc5b34d1d6ddb6a9e39ac32b33afb9fa45 Mon Sep 17 00:00:00 2001 From: Jinwoo Kim Date: Thu, 7 Jan 2021 17:42:24 +0900 Subject: [PATCH 2/6] Add ASDisplayNode snippet --- CodeSnippets/StyleShare - Node.codesnippet | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 CodeSnippets/StyleShare - Node.codesnippet diff --git a/CodeSnippets/StyleShare - Node.codesnippet b/CodeSnippets/StyleShare - Node.codesnippet new file mode 100644 index 0000000..887df66 --- /dev/null +++ b/CodeSnippets/StyleShare - Node.codesnippet @@ -0,0 +1,66 @@ + + + + + IDECodeSnippetCompletionPrefix + + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + import StyleShareReactive +import StyleShareUI + +final class <#name#>: ASDisplayNode { + + // MARK: Module + + struct Payload { + } + + + // MARK: Constants + + private enum Typo { + } + + + // MARK: Properties + + private let payload: Payload + + + // MARK: UI + + + // MARK: Initializing + + init(payload: Payload) { + self.payload = payload + super.init() + self.automaticallyManagesSubnodes = true + } + + + // MARK: LayoutSpec + + override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { + return ASInsetLayoutSpec() + } + +} + IDECodeSnippetIdentifier + 5DC94BAC-BAF9-4300-8D39-9B6964D4E3D1 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetSummary + + IDECodeSnippetTitle + StyleShare - Node + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + From 5c3a5f822fbb8362225e79cffc74ebc275341f6a Mon Sep 17 00:00:00 2001 From: Jinwoo Kim Date: Thu, 7 Jan 2021 17:42:33 +0900 Subject: [PATCH 3/6] Add Pure Module snippet --- .../StyleShare - Pure Module.codesnippet | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 CodeSnippets/StyleShare - Pure Module.codesnippet diff --git a/CodeSnippets/StyleShare - Pure Module.codesnippet b/CodeSnippets/StyleShare - Pure Module.codesnippet new file mode 100644 index 0000000..bc4040a --- /dev/null +++ b/CodeSnippets/StyleShare - Pure Module.codesnippet @@ -0,0 +1,32 @@ + + + + + IDECodeSnippetCompletionPrefix + + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + // MARK: Module + + struct Dependency { + } + + struct Payload { + } + IDECodeSnippetIdentifier + 109BC502-5C76-4FE2-85CF-FC329007A1EE + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetSummary + + IDECodeSnippetTitle + StyleShare - Pure Module + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 0 + + From d053adcd7ebab1b967a3d0e262f57ed64e157ee4 Mon Sep 17 00:00:00 2001 From: Jinwoo Kim Date: Thu, 7 Jan 2021 17:42:43 +0900 Subject: [PATCH 4/6] Add Test snippet with Pure --- CodeSnippets/StyleShare - Test.codesnippet | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 CodeSnippets/StyleShare - Test.codesnippet diff --git a/CodeSnippets/StyleShare - Test.codesnippet b/CodeSnippets/StyleShare - Test.codesnippet new file mode 100644 index 0000000..2395e0e --- /dev/null +++ b/CodeSnippets/StyleShare - Test.codesnippet @@ -0,0 +1,38 @@ + + + + + IDECodeSnippetCompletionPrefix + + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + @testable import <#name#> + +final class <#name#>: QuickSpec { + override func spec() { + } +} + +extension Factory where Module == <#name#> { + static func dummy() -> Factory { + return .init(dependency: .init()) + } +} + + IDECodeSnippetIdentifier + 2633990D-B131-4D0A-9BEC-2B2B7965921F + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetSummary + + IDECodeSnippetTitle + StyleShare - Test + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 0 + + From 5acb87b5de369f8c74ad7e133dd4b17dd023b87d Mon Sep 17 00:00:00 2001 From: Jinwoo Kim Date: Thu, 7 Jan 2021 17:42:57 +0900 Subject: [PATCH 5/6] Add Reactor snippet with ReactorKit and Pure --- CodeSnippets/StyleShare - Reactor.codesnippet | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 CodeSnippets/StyleShare - Reactor.codesnippet diff --git a/CodeSnippets/StyleShare - Reactor.codesnippet b/CodeSnippets/StyleShare - Reactor.codesnippet new file mode 100644 index 0000000..0ebc285 --- /dev/null +++ b/CodeSnippets/StyleShare - Reactor.codesnippet @@ -0,0 +1,69 @@ + + + + + IDECodeSnippetCompletionPrefix + + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + import StyleShareReactive + +final class <#name#>: Reactor, FactoryModule { + + // MARK: Module + + struct Dependency { + } + + struct Payload { + } + + + enum Action { + } + + enum Mutation { + } + + struct State { + } + + + // MARK: Properties + + let initialState: State + + + // MARK: Initializing + + init(dependency: Dependency, payload: Payload) { + defer { _ = self.state } + self.initialState = State() + } + + func mutate(action: Action) -> Observable<Mutation> { + return .empty() + } + + func reduce(state: State, mutation: Mutation) -> State { + return state + } +} + + IDECodeSnippetIdentifier + 84D36537-6B60-4299-80E8-122607BF40D9 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetSummary + + IDECodeSnippetTitle + StyleShare - Reactor + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 0 + + From dd69340a9e8280f7a63116f056408dc9dd067f13 Mon Sep 17 00:00:00 2001 From: Jinwoo Kim Date: Thu, 7 Jan 2021 17:43:13 +0900 Subject: [PATCH 6/6] Add UIViewController snippet with ReactorKit and Texture and Pure --- .../StyleShare - UIViewController.codesnippet | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 CodeSnippets/StyleShare - UIViewController.codesnippet diff --git a/CodeSnippets/StyleShare - UIViewController.codesnippet b/CodeSnippets/StyleShare - UIViewController.codesnippet new file mode 100644 index 0000000..67efa14 --- /dev/null +++ b/CodeSnippets/StyleShare - UIViewController.codesnippet @@ -0,0 +1,78 @@ + + + + + IDECodeSnippetCompletionPrefix + + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + import StyleShareUI + +final class <#name#>: BaseViewController, View, FactoryModule { + + // MARK: Module + + struct Dependency { + } + + struct Payload { + } + + + // MARK: Constants + + private enum Typo { + } + + + // MARK: Properties + + + // MARK: UI + + + // MARK: Initializing + + init(dependency: Dependency, payload: Payload) { + defer { self.reactor = payload.reactor } + super.init() + } + + + // MARK: View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + } + + + // MARK: Binding + + func bind(reactor: <#name#>) { + } + + + // MARK: Layout + + override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { + return ASLayoutSpec() + } +} + + IDECodeSnippetIdentifier + 96005E4B-F7F1-493E-8858-2C6D6FB8C537 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetSummary + + IDECodeSnippetTitle + StyleShare - UIViewController + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 0 + +