Do Assets For Specific Extensions Need To Be Added Separately?

Hi folks,

When you use an extension that (for example) has a .js file as an asset, do you need to register that script separately? If so, how is this best done? Should be reside in the extension’s asset directory or should be moved under public>assets?

If the extension is well written, then the assets will automatically be included. If they don’t, I would think twice about the quality of the extension.

It should be self contained within the extension’s package and 'publish()'ed on demand. After it has been published it should be registered. Generally speaking, All of this should be handled within the extension and using Yii’s API methods for publishing and registering CSS file.

Thanks guys. I’ve had a closer look at extension architecture and I see now that it is self-contained.