-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from infinum/feature/v3
Version 3 - generator of templates
- Loading branch information
Showing
141 changed files
with
3,615 additions
and
369 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
protocol FormatterInterface: class { | ||
} | ||
|
||
extension FormatterInterface { | ||
} |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
protocol PresenterInterface: class { | ||
} | ||
|
||
extension PresenterInterface { | ||
} |
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
XCODE_USER_TEMPLATES_DIR=~/Library/Developer/Xcode/Templates/File\ Templates | ||
VIPER_TEMPLATES_DIR=VIPER\ Templates | ||
VIPER_TEMPLATES_DIR=Templates/VIPER\ Templates | ||
|
||
install_templates: | ||
rm -R -f $(XCODE_USER_TEMPLATES_DIR)/$(VIPER_TEMPLATES_DIR) | ||
mkdir -p $(XCODE_USER_TEMPLATES_DIR) | ||
cp -R -f $(VIPER_TEMPLATES_DIR) $(XCODE_USER_TEMPLATES_DIR) | ||
|
||
uninstall_templates: | ||
rm -R $(XCODE_USER_TEMPLATES_DIR)/$(VIPER_TEMPLATES_DIR) | ||
rm -R $(XCODE_USER_TEMPLATES_DIR)/$(VIPER_TEMPLATES_DIR) |
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
File renamed without changes
File renamed without changes
File renamed without changes
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>DefaultCompletionName</key> | ||
<string>VIPERModule</string> | ||
<key>Description</key> | ||
<string>This generates a new Module using 🐍VIPER generator.</string> | ||
<key>Kind</key> | ||
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string> | ||
<key>Options</key> | ||
<array> | ||
<dict> | ||
<key>Description</key> | ||
<string>The name of the module to create</string> | ||
<key>Default</key> | ||
<string></string> | ||
<key>Identifier</key> | ||
<string>moduleName</string> | ||
<key>Name</key> | ||
<string>New <%= @template.name %> Name:</string> | ||
<key>Required</key> | ||
<string>YES</string> | ||
<key>Type</key> | ||
<string>text</string> | ||
</dict> | ||
<dict> | ||
<key>Default</key> | ||
<string>___VARIABLE_moduleName___</string> | ||
<key>Identifier</key> | ||
<string>productName</string> | ||
<key>Type</key> | ||
<string>static</string> | ||
</dict> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>interface</string> | ||
<key>Name</key> | ||
<string>Generate Interface Builder:</string> | ||
<key>Description</key> | ||
<string>Which interface builder to generate</string> | ||
<key>Type</key> | ||
<string>popup</string> | ||
<key>Default</key> | ||
<string><%= @interface.default.name%></string> | ||
<key>Values</key> | ||
<array> | ||
<%- @interface.types.each do |type| -%> | ||
<string><%= type.name %></string> | ||
<%- end -%> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>complex</string> | ||
<key>Name</key> | ||
<string>Module Complexity:</string> | ||
<key>Description</key> | ||
<string>Type of a module to generate - simple, with interactor, or with interactor and formatter</string> | ||
<key>Type</key> | ||
<string>popup</string> | ||
<key>Default</key> | ||
<string><%= @complexity.default.name%></string> | ||
<key>Values</key> | ||
<array> | ||
<%- @complexity.types.each do |type| -%> | ||
<string><%= type.name %></string> | ||
<%- end -%> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>Platforms</key> | ||
<array> | ||
<string>com.apple.platform.iphoneos</string> | ||
</array> | ||
<key>SortOrder</key> | ||
<string>1</string> | ||
<key>Summary</key> | ||
<string>This generates a new 🐍 VIPER module.</string> | ||
</dict> | ||
</plist> |
29 changes: 29 additions & 0 deletions
29
Templates/Resources/Templates/___FILEBASENAME___.storyboard.erb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina4_7" orientation="portrait"> | ||
<adaptation id="fullscreen"/> | ||
</device> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--___VARIABLE_moduleName___ View Controller--> | ||
<scene sceneID="XJ1-QA-Nrj"> | ||
<objects> | ||
<viewController storyboardIdentifier="___VARIABLE_moduleName___ViewController" id="zIc-eW-6fX" customClass="___VARIABLE_moduleName___ViewController" customModuleProvider="target" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="Z2g-4m-atm"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<viewLayoutGuide key="safeArea" id="3pi-N7-nbV"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="rle-ol-2Ax" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="306" y="303"/> | ||
</scene> | ||
</scenes> | ||
</document> |
30 changes: 30 additions & 0 deletions
30
Templates/Resources/Templates/___FILEBASENAME___Formatter.swift.erb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ___FILENAME___ | ||
// ___PROJECTNAME___ | ||
// | ||
// Created by ___FULLUSERNAME___ on ___DATE___. | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. | ||
// | ||
// This file was generated by the 🐍 VIPER generator | ||
// | ||
|
||
import UIKit | ||
<% if @template.generate_io -%> | ||
import RxSwift | ||
import RxCocoa | ||
<% end -%> | ||
|
||
final class ___VARIABLE_moduleName___Formatter { | ||
} | ||
|
||
// MARK: - Extensions - | ||
|
||
extension ___VARIABLE_moduleName___Formatter: ___VARIABLE_moduleName___FormatterInterface { | ||
<%- if @template.generate_io -%> | ||
|
||
func format(for input: ___VARIABLE_moduleName___.FormatterInput) -> ___VARIABLE_moduleName___.FormatterOutput { | ||
return ___VARIABLE_moduleName___.FormatterOutput() | ||
} | ||
|
||
<%- end -%> | ||
} |
22 changes: 22 additions & 0 deletions
22
Templates/Resources/Templates/___FILEBASENAME___Interactor.swift.erb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// ___FILENAME___ | ||
// ___PROJECTNAME___ | ||
// | ||
// Created by ___FULLUSERNAME___ on ___DATE___. | ||
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. | ||
// | ||
// This file was generated by the 🐍 VIPER generator | ||
// | ||
|
||
import Foundation | ||
<% if @template.generate_io -%> | ||
import RxSwift | ||
<% end -%> | ||
|
||
final class ___VARIABLE_moduleName___Interactor { | ||
} | ||
|
||
// MARK: - Extensions - | ||
|
||
extension ___VARIABLE_moduleName___Interactor: ___VARIABLE_moduleName___InteractorInterface { | ||
} |
Oops, something went wrong.