A Swift command line tools for generating swift file from YAML
Xboiler is a SwiftUI-based framework designed to simplify the process of automatically generating boilerplate code from a YAML file. With xboiler, you can define folder and file structures in a YAML file, which will then be automatically generated into .swift files.
This framework eliminates repetitive tasks, where developers would normally have to manually copy files one by one when starting a new project. Xboiler is designed to streamline and accelerate this process, allowing developers to focus on core development without being bogged down by manual setup tasks.
HomeBrew.
brew tap Waffle000/xboiler
brew install xboiler
outputFolder: MySwiftUIProject
appName: MyApp
mainView: HomeView
bundleId: com.myapp.example
platform: iOS
deploymentTarget: 16.0
device: universal
files:
- name: ContentView
type: view
content: |
Text("Welcome to Content View")
folders:
- folderName: Views
files:
- name: HomeView
type: view
content: |
Text("Welcome to Home View")
- folderName: ViewModels
files:
- name: HomeViewModel
type: class
inherits:
superclass: ObservableObject
content: |
@Published var title = "Home View"
- folderName: Managers
files:
- name: DataManager
type: class
inherits:
superclass: NSObject
protocols:
- DataManagerProtocol
content: |
func fetchData() {
print("Fetching data...")
}
- folderName: Protocol
files:
- name: DataManagerProtocol
type: protocol
content: |
func fetchData()
Version
Xboiler --version
Simple for usage
Xboiler generate example.yaml
Pull requests and issues are always welcome. Please open any issues and PRs for bugs, features, or documentation.
This tool is powered by:
Xboiler is licensed under the MIT license. See LICENSE for more info.