Documentation
¶
Overview ¶
Package config handles builder.json configuration file management. It provides loading, saving, and validation of project configuration.
Index ¶
Constants ¶
View Source
const ConfigFileName = "builder.json"
ConfigFileName is the default configuration file name.
Variables ¶
View Source
var ErrConfigNotFound = errors.New("builder.json not found")
ErrConfigNotFound indicates builder.json was not found.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Project string `json:"project"`
Platform string `json:"platform"`
GitHub GitHubConfig `json:"github"`
IOS IOSConfig `json:"ios,omitempty"`
Flutter FlutterConfig `json:"flutter,omitempty"`
ReactNative ReactNativeConfig `json:"reactNative,omitempty"`
MobAI MobAIConfig `json:"mobai,omitempty"`
}
Config represents the builder.json configuration file
type FlutterConfig ¶
type FlutterConfig struct {
Version string `json:"version,omitempty"` // Pinned Flutter version (e.g., "3.24.0")
}
FlutterConfig holds Flutter-specific settings
type GitHubConfig ¶
GitHubConfig holds GitHub repository settings
type IOSConfig ¶
type IOSConfig struct {
// Path to iOS project relative to repo root (e.g., "ios" for React Native, "platforms/ios" for Cordova)
// Empty means root directory contains the Xcode project
Path string `json:"path,omitempty"`
Scheme string `json:"scheme,omitempty"` // Xcode scheme to build (auto-detected if empty)
Signing bool `json:"signing,omitempty"` // Whether code signing is configured
Configuration string `json:"configuration,omitempty"` // Build configuration: Debug (faster) or Release (production)
}
IOSConfig holds iOS build settings
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles configuration loading and persistence
type MobAIConfig ¶
type MobAIConfig struct {
URL string `json:"url,omitempty"` // MobAI API URL (default: http://localhost:8686)
DeviceID string `json:"device_id,omitempty"` // Preferred device ID (default: first available)
}
MobAIConfig holds MobAI settings for local development
type ReactNativeConfig ¶ added in v0.2.0
type ReactNativeConfig struct {
MetroPort int `json:"metroPort,omitempty"` // Metro bundler port (default: 8081)
Expo bool `json:"expo,omitempty"` // Whether this is an Expo project
}
ReactNativeConfig holds React Native-specific settings
type ValidationError ¶
ValidationError represents a configuration validation error
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.