bolt
bolt copied to clipboard
A POC Rake like tool in Swift
bolt
This is a simple proof of concept for a
Rake
like tool
written in Swift.
Examples
(See main.swift
)
Run a task:
task("Add Stuff") {
println("1 + 1 is \(1 + 1)")
}
runTask("Add Stuff") // 1 + 1 is 2
Run multiple tasks:
task("Add Stuff") {
println("1 + 1 is \(1 + 1)")
}
task("Multiply Stuff") {
println("2 * 2 is \(2 * 2)")
}
runTasks("Add Stuff", "Multiply Stuff")
// 1 + 1 is 2
// 2 * 2 is 4
Tasks that don't exist:
runTask("Missing Task") // No task named 'Missing Task' exists
Composing multiple tasks:
task("Custom Task", "Add Stuff", "Multiply Stuff", "Missing Task")
runTask("Custom Task")
// 1 + 1 is 2
// 2 * 2 is 4
// No task named 'Missing Task' exists
Now What?
If this proved to be an interesting idea, there would need to be a
Rakefile
equivalent for bolt. I'm not sure how this would be
implemented. If you have any thoughts on this concept please open an
issue where we can
discuss them.