All Downloads are FREE. Search and download functionalities are using the official Maven repository.

asset.pipeline.AssetPipelineClassLoaderEntry.groovy Maven / Gradle / Ivy

Go to download

JVM Asset Pipeline library for serving static web assets, bundling, minifying, and extensibility for transpiling.

The newest version!
package asset.pipeline

/**
 * Holds config for nested class loaders for dynamically loading, and unloading assets
 * @author David Estes
 */
class AssetPipelineClassLoaderEntry {
	public ClassLoader classLoader
	Properties manifest
	ClassLoader classLoader 

	static final String MANIFEST_LOCATION = "assets/manifest.properties"

	public AssetPipelineClassLoaderEntry(ClassLoader classLoader) {
		this.classLoader = classLoader
		URL res = classLoader.getResource(MANIFEST_LOCATION)
		if(res) {
			def manifestProps = new Properties()
			URLConnection resConnection = res.openConnection()
			resConnection.setUseCaches(false)
			def propertiesStream = resConnection.getInputStream()
			manifestProps.load(propertiesStream)
			manifest = manifestProps
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy