GitHub - NSHipster/swift-gyb: Evaluates and runs a Swift GYB script
source link: https://github.com/NSHipster/swift-gyb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
swift-gyb
Evaluates and runs a Swift GYB script.
Disclaimer: I wouldn’t recommend using this for much beyond quick code generation and testing existing GYB templates in your project. For anything more significant, you might instead consider Sourcery.
Installation
Install swift-gyb
with Homebrew
using the following command:
$ brew install nshipster/formulae/swift-gyb
Usage
// hello.swift.gyb %{ names = ['Johnny', 'Jane'] }% % for name in names: print("Hello, ${name}!") % end
$ swift gyb ./hello.swift.gyb
Hello, Johnny!
Hello, Jane!
License
MIT
Contact
NSHipster (@NSHipster)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK