The Problem
When I was building a Swift library, I often found myself frustrated by the need to repeatedly enter the command swift test
every time I wanted to run my tests. This process was time-consuming and made it difficult to efficiently test and debug my code. Additionally, the swift test
command did not have a built-in watch feature, meaning I had to manually run the tests every time I made changes to my code.
This is when I was inspired to create Runo, a tool that would streamline the process of running command line scripts. I wanted a solution that was as easy to use as npm scripts, but could be used for projects built in any technology or language stack, not just JavaScript.
Discover What Runo Can Do
Simplifying Script Execution
Runo was designed to simplify the process of running command line scripts, making it easier for developers to manage their projects. By storing all of your scripts in a single configuration file, Runo eliminates the need to manually enter commands, saving you time and reducing frustration.
For instance, consider a scenario where you need to build your Xcode project. Normally, you would run the following command in your terminal:
xcodebuild -project MyProject.xcodeproj -scheme MyProjectScheme build
With Runo, you can store this script in your configuration file, making it much simpler to run. Here's an example of what your runo.json
configuration file might look like:
{
"scripts": {
"build": "xcodebuild -project MyProject.xcodeproj -scheme MyLibrary build"
}
}
Now, all you have to do is run the following command in your terminal:
runo build
This runs the script you defined in the configuration file and gives you the same result as if you had run the original xcodebuild
command.
Test-driven development made easy and fun
Test-driven development (TDD) is a crucial aspect of software development that ensures the quality of code. Runo makes TDD even easier and more fun with its watch mode. The watch mode runs the tests automatically whenever changes are made to the code, making it possible to receive feedback in real-time. No more manual re-running of tests every time you make a change
For example, consider a scenario where you are working on a Swift library and you want to continuously run your test cases as you make changes to your code. With Runo, you can easily accomplish this by using the watch mode. By including the following in your Runo configuration file:
{
"scripts": {
"test": "swift test"
}
}
You can then run the following command in your terminal:
runo test -w Sources
The -w
option is used to specify the directories that Runo should watch for changes. In this case, the current directory (Sources
) is being watched. As soon as you make a change to your code and save it, Runo will automatically run the swift test
command. This makes TDD a breeze and eliminates the need for you to continuously re-enter the swift test
command.
Conclusion
In conclusion, Runo is a powerful and flexible command line tool that simplifies the process of running scripts. By allowing you to define your scripts in a config file, Runo simplifies the process of running a complex scripts, like xcodebuild
, with just a few commands. Its watch mode also makes TDD a breeze. Best of all, Runo is an open-source project, so you can contribute to its development and make it even better.
Top comments (0)