Welcome Guest, Not a member yet? Register   Sign In
Module Assets
#1

Hi all! I ran into a new scenario today and I wanted to head out what everyone else thought. CI4 leverages namespaces to allow a lot of power from modules. As a module developer I can package migrations and models, can claim routes and add views, and can even provide services, config, and helpers - all of it automatically enabled by Composer installation or by adding the module to Config/Autoload.php. The one thing I can’t do is include any assets without the user relocating files. 
My current scenario is a module that uses a custom pic for display - but it could be a CSS code, or JavaScript or any number of things. Having a user copy the files in takes an otherwise plug-and-play module and adds configuration steps, and it also takes those assets out of the update stream (or requires the user to recopy them every update). 
Because files (ideally) are only sever out of public/ and the only guaranteed place the framework can modify the file system is writable/, I don’t see any way to work around this as things sit now. 

My question to YOU! Is this worth exploring some structure change to work around? How do you handle module assets currently? If you have experience with other frameworks, any idea how they do it?
Reply


Messages In This Thread
Module Assets - by MGatner - 07-28-2019, 05:02 PM
RE: Module Assets - by orionstar - 07-28-2019, 05:23 PM
RE: Module Assets - by MGatner - 07-28-2019, 06:04 PM
RE: Module Assets - by orionstar - 07-28-2019, 06:22 PM
RE: Module Assets - by MGatner - 07-29-2019, 01:16 PM
RE: Module Assets - by InsiteFX - 07-29-2019, 04:09 PM
RE: Module Assets - by Avega Soft - 07-29-2019, 07:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB