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.dart, String routesDir = 'routes', String middlewareDir = 'middleware', String publicDir = 'public', String outputDir = '.spry', ReloadStrategy reload = ReloadStrategy.restart, String? wranglerConfig})
Creates a build configuration.
const
BuildConfig.fromJson(Map<String, dynamic> json, {required String rootDir})
Creates a build configuration from JSON emitted by spry.config.dart.
factory

Properties

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
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, ReloadStrategy? reload, Object? wranglerConfig = _unset}) → BuildConfig
Returns a copy with selected fields replaced.
merge(Map<String, dynamic> 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