Class AssetsCopierTask
- All Implemented Interfaces:
BuildTask
An optional filter can be used to filter files that are copied under key "pattern".
The name and target path of each file which is copied successfully, will be added to a node with relative path to the source directory into a data key named "assets" as a map.
For example for a configuration of source "src/image" and target "target/assets". A file named "a.jpg" with full path "src/images/some/path/a.jpg" will be copied to "target/assets/some/path/a.jpg" and node with path "some/path" will have a data with key "assets" which is a map containing "a.jpg" ~> "target/assets/some/path/a.jpg".
It is not allowed for target directory to be under any of sources. As files will overwrite the ones on target and might overwrite ones from other sources based on order defined and matching name.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(BuildContext buildContext) If a plugin depends on config files in addition to the general config file of the application, like functionality extensions stored in files, it shall return these paths here.If a plugin depends on file input, it shall return list of its input paths to be watched for changes.Methods inherited from class com.mohamnag.jstatic.plugins.AbstractDirectoryCrawler
extractPathElements, getPageName
-
Field Details
-
DATA_KEY_ASSETS
- See Also:
-
-
Constructor Details
-
AssetsCopierTask
-
-
Method Details
-
run
-
underWatchInputPaths
Description copied from interface:BuildTask
If a plugin depends on file input, it shall return list of its input paths to be watched for changes. Paths can be either files or directories. In case of directories, only root path are necessary to be listed and if input path has subdirectories, they will be automatically watched.- Specified by:
underWatchInputPaths
in interfaceBuildTask
-
underWatchConfigPaths
Description copied from interface:BuildTask
If a plugin depends on config files in addition to the general config file of the application, like functionality extensions stored in files, it shall return these paths here. A change detected in these paths will result in recreation of the plugin.- Specified by:
underWatchConfigPaths
in interfaceBuildTask
-