Core. ResourceVersion

The generation of the resource version is done by layacmd or IDE ResourceVersion Simplify the process of using.

call enable Enable resource versioning.

Constructor

new ResourceVersion()

Member

(static) manifest :Object

Methods

addVersionPrefix(originURL) → {String}

Adds a version prefix to the loading path.
Parameters:
Name Type Description
originURL String Source path.
Returns:
Type:
String
Formatted new path.

enable(manifestFile, callback)

Enable resource versioning.

Resource management is required because only releases are available. Therefore, when there is no resource management file, you can set the path that manifestFile is null or does not exist.

Parameters:
Name Type Description
manifestFile String The path to the manifest (JSON) file.
callback Handler After the manifest (JSON) file is loaded, execute.