cake-bake
Version, currently 0.3.04 versions
- 0.3.0latestFeb 18, 2019
- 0.2.1not indexedApr 7, 2020
- 0.2.0not indexedApr 7, 2020
- 0.1.0not indexedApr 7, 2020
github.com/vladfaust/cake-bake
Bake Cakefile into native Crystal code 🍞
6 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
cake-bake:
github: vladfaust/cake-bake
version: ~> 0.3.0Then run:
shards installshard.yml
- Crystal
0.23.1- License
- MIT
- Author
- Vlad Faust <mail@vladfaust.com>
Dependencies
This version declares no dependencies.
README
# Cake-Bake
[](https://crystal-lang.org/)
[](https://travis-ci.com/vladfaust/cake-bake)
[](https://github.vladfaust.com/cake-bake)
[](https://github.com/vladfaust/cake-bake/releases)
[](https://github.com/veelenga/awesome-crystal)
[](https://vladfaust.com)
[](https://www.patreon.com/vladfaust)
[](https://gitter.im/vladfaust/Lobby)
Cake-Bake *[ka-ke-ba-ke]* allows to bake [Cakefile](https://github.com/axvm/cake) into native Crystal code.
## Supporters
Thanks to all my patrons, I can continue working on beautiful Open Source Software! 🙏
[Alexander Maslov](https://seendex.ru), [Lauri Jutila](https://github.com/ljuti)
*You can become a patron too in exchange of prioritized support and other perks*
[](https://www.patreon.com/vladfaust)
## About
Why? Because sometimes [cake]((https://github.com/axvm/cake)) tasks are wanted to be run as binaries.
For example, to run from a Docker container with an already built application: `docker run my-crystal-app bin/cake db:migrate`.
## Installation
Add this to your application's `shard.yml`:
```yaml
targets:
cake:
main: src/run/cake.cr
dependencies:
cake-bake:
github: vladfaust/cake-bake
version: ~> 0.3.0
```
## Usage
Given `./Cakefile`:
```crystal
require "./src/some_file" # These requires
task :foo
puts "bar"
end
```
`./src/run/cake.cr`:
```crystal
require "cake-bake"
Cake.bake("../../Cakefile") # Full path to Cakefile needed to properly resolve requires (see above)
# The Cakefile code will be put here, yay
```
Then execute from `./`:
```shell
$ crystal src/run/cake -- foo
bar
$ crystal build src/run/cake
$ ./cake foo
bar
$ shards build
$ ./bin/cake foo
bar
```
## Contributing
1. Fork it ( https://github.com/vladfaust/cake-bake/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [@vladfaust](https://github.com/vladfaust) Vlad Faust - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.3.0- Tagged
- Feb 18, 2019
- Commit
422da72e3a6e- Crystal
0.23.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/vladfaust/cake-bake
Metadata
- Created
- Aug 13, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 4