BuildConfig class final

Build-time configuration for generating and serving a Spry app.

Constructors

BuildConfig({required String rootDir, String host = '0.0.0.0', int port = 3000, BuildTarget target = BuildTarget.vm, String routesDir = 'routes', String middlewareDir = 'middleware', String publicDir = 'public', String outputDir = '.spry', bool caseSensitive = true, int? handlerCacheCapacity, ReloadStrategy reload = ReloadStrategy.restart, String? wranglerConfig, OpenAPIConfig? openapi, ClientConfig? client})
Creates a build configuration.
const
BuildConfig.fromJson(Map<String, Object?> json, {required String rootDir})
Creates a build configuration from JSON emitted by spry.config.dart.
factory

Properties

caseSensitive → bool
Whether generated routing is case-sensitive.
final
client → ClientConfig?
Optional Spry client generation config.
final
handlerCacheCapacity → int?
Optional LRU cache capacity for generated handler lookups.
final
hashCode → int
The hash code for this object.
no setterinherited
host → String
Host used by spry serve.
final
middlewareDir → String
Middleware directory relative to rootDir.
final
openapi → OpenAPIConfig?
Optional OpenAPI generation config.
final
outputDir → String
Generated output directory relative to rootDir.
final
port → int
Port used by spry serve.
final
publicDir → String
Public asset directory relative to rootDir.
final
reload → ReloadStrategy
Reload strategy used by spry serve.
final
rootDir → String
Absolute project root directory.
final
routesDir → String
Routes directory relative to rootDir.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → BuildTarget
Target runtime.
final
wranglerConfig → String?
Optional Wrangler config path.
final

Methods

copyWith({String? rootDir, String? host, int? port, BuildTarget? target, String? routesDir, String? middlewareDir, String? publicDir, String? outputDir, bool? caseSensitive, Object? handlerCacheCapacity = _unset, ReloadStrategy? reload, Object? wranglerConfig = _unset, Object? openapi = _unset, Object? client = _unset}) → BuildConfig
Returns a copy with selected fields replaced.
merge(Map<String, Object?> overrides) → BuildConfig
Applies JSON-like overrides onto this configuration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited