ClientScript and AssetManager


I have a question about ClientScript, AssetManager and how the two work together. I’ve searched around on the forums a bit, and it seems the general consensus on how to properly use the AssetManager is best summed up by phtamas in this post:

We are currently developing a website where we want to host all our assets (css, js, images, etc) on Amazon S3, so we extended the AssetManager class to publish local (to the webserver) files to S3. Typical usage would be:

$s3_path = assetManager()->publish('/js/account/index.js');


Is this a proper way to extend the AM? Are we going outside the scope of what the AM was meant for? Has anyone tried doing something similar? Would just like to hear some thoughts. Thanks!