AssetMover class

The AssetMover class is responsible for copying third-party frontend assets (like JavaScript or CSS files) from a node_modules source directory to a public static output directory.

This is typically used when preparing assets for deployment or bundling in a static website or web app. The files are defined in the dependencies section of the Warden config (warden.yaml).

Any missing files will be logged to the terminal.

Constructors

AssetMover({required Destination destination, required Asset assets, required FileCompressor fileCompressor})

Properties

assets Asset
final
destination Destination
final
fileCompressor FileCompressor
final
hashCode int
The hash code for this object.
no setterinherited
nodeModules Directory
getter/setter pair
outputDir Directory
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldCompress bool
getter/setter pair

Methods

moveAllFiles(List<String> files, String dependencySrc) → void
Copies each file defined in dependencies.files from the node_modules directory to the configured output directory.
moveAssets() → dynamic
moveFilesExclSuffix(String suffix, List<String> files, String dependencySrc) → void
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