Typescript / npm and assets application.xml?

how can / do i use application.xml with npm / typescript, so i can use the asset lib caching?

What kind of asset caching are you thinking of?

You mean, like how Assets.getBitmapData ("image.png") caches the object, so repeated requests will return the already loaded BitmapData object?

Look at the “PiratePig” sample, it has an example of defining an asset library, and preloading that, which should be compatible with the openfl.utils.Assets caching.

If you mean something else (or have other questions) please let me know :slight_smile:

yeah i mean i know the Haxe version uses application.xml for
http://api.openfl.org/openfl/Assets.html
but what about npm?
http://www.openfl.org/learn/npm/api/classes/openfl.utils.assets.html
do i also use application.xml in the project root folder?
what loads it? etc.

Here’s how we handled it in the PiratePig demo:

1.) We put the files we need into the “dist” folder already:

2.) We manually created an AssetManifest instance to load and give to the openfl.utils.Assets class