Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.91 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.91 KB

Rapier

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Rapier is available through CocoaPods. To install it, simply add the following line to your Podfile: (not fully automatic yet)

pod 'Rapier/AutoIntegrate'

This will also pull in sourcery, which is used for code generation. Then use the follwing script in a pre compile build phse:

sourcerycmd="$PODS_ROOT/Sourcery/bin/sourcery"
normal_template_location="$PODS_ROOT/Rapier/Templates"
example_template_location="$PODS_ROOT/../../Rapier/Templates"
if [ -d "$normal_template_location" ]; then
  template_location="$normal_template_location"
else
  template_location="$example_template_location"
fi

$sourcerycmd --templates "$template_location" --sources "$SRCROOT" --exclude-sources "$PODS_ROOT" --exclude-sources "$SRCROOT/PODS"  --output "$SRCROOT/Generated" --verbose

Your projects Sourceroot should contain a folder 'Generated'. Add it to your xcode project, done.

If you don't like the default integration, just add

pod 'Rapier'

to your project, but you need to setup your sourcery integration manually. Note: This pods uses swifttemplates, which aren't supported by the hoenrew release of sourcery. (Use the sourcery release tap instead, or include sourcery via cocoapods.)

Author

kaygro, [email protected]

License

Rapier is available under the MIT license. See the LICENSE file for more info.