RequireStrategy class

A load strategy for the require-js module system.

Inheritance

Constructors

RequireStrategy(ReloadConfiguration reloadConfiguration, Future<Map<String, String>> _moduleProvider(MetadataProvider metadataProvider), Future<Map<String, String>> _digestsProvider(MetadataProvider metadataProvider), Future<String?> _moduleForServerPath(MetadataProvider provider, String sourcePath), Future<String?> _serverPathForModule(MetadataProvider provider, String module), Future<String?> _sourceMapPathForModule(MetadataProvider provider, String module), String? _serverPathForAppUri(String appUri), Future<Map<String, ModuleInfo>> _moduleInfoForProvider(MetadataProvider metadataProvider), AssetReader assetReader, BuildSettings _buildSettings)

Properties

buildSettings BuildSettings
App build settings, such as entry point, build flags, app kind etc.
no setteroverride
handler → Handler
A handler for strategy specific requests.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
id String
The ID for this strategy.
no setteroverride
loadLibrariesModule String
Module containing code for loading libraries.
no setteroverride
loadModuleSnippet String
Returns a snippet of JS code that can be used to load a JS module.
no setteroverride
moduleFormat String
Module format for JS generated by the compiler.
no setteroverride
packageConfigPath String
The absolute path to the app's package configuration.
no setterinherited
reloadConfiguration ReloadConfiguration
The reload configuration for this strategy, e.g. liveReload.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bootstrapFor(String entrypoint) Future<String>
Returns the bootstrap required for this LoadStrategy.
override
g3RelativePath(String absolutePath) String?
Returns the relative path in google3, determined by the absolutePath.
override
loadClientSnippet(String clientScript) String
JS code snippet for loading the injected client script.
override
metadataProviderFor(String entrypoint) MetadataProvider
Returns the MetadataProvider for the application located at the provided entrypoint.
inherited
moduleForServerPath(String entrypoint, String serverPath) Future<String?>
Returns the module for the corresponding server path.
override
moduleInfoForEntrypoint(String entrypoint) Future<Map<String, ModuleInfo>>
Returns a map from module id to module info for the provided entrypoint.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serverPathForAppUri(String appUri) String?
Returns the server path for the app uri.
override
serverPathForModule(String entrypoint, String module) Future<String?>
Returns the server path for the provided module.
override
sourceMapPathForModule(String entrypoint, String module) Future<String?>
Returns the source map path for the provided module.
override
toString() String
A string representation of this object.
inherited
trackEntrypoint(String entrypoint) Future<void>
Initializes a MetadataProvider for the application located at the provided entrypoint.
inherited

Operators

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