Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/NSHipster/swift-gyb

Evaluates and runs a Swift GYB script
https://github.com/NSHipster/swift-gyb

Last synced: 3 months ago
JSON representation

Evaluates and runs a Swift GYB script

Awesome Lists containing this project

README

        

# swift-gyb

Evaluates and runs a [Swift GYB](https://nshipster.com/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](https://github.com/krzysztofzablocki/Sourcery).

## Installation

Install `swift-gyb` with [Homebrew](https://brew.sh)
using the following command:

```terminal
$ brew install nshipster/formulae/swift-gyb
```

## Usage

```python
// hello.swift.gyb
%{ names = ['Johnny', 'Jane'] }%
% for name in names:
print("Hello, ${name}!")
% end
```

```terminal
$ swift gyb ./hello.swift.gyb
Hello, Johnny!
Hello, Jane!
```

## License

MIT

## Contact

NSHipster ([@NSHipster](https://twitter.com/NSHipster))