So the plan is to create a library of static resources that can be quickly rolled out into a few standard site structures. A major bottleneck in the process is creating chunks, templates, and snippets and then linking them to the static resources. Before I write my own snippet to do this, I thought I'd ask if something already exists that will crawl a directory and create elements of a certain kind based on the file name, contents, and parent directory of the files found.
Example: file in /assets/chunks/header.html would be created as a new chunk called "header" using a static media source pointing to that file.
Thanks in advance!
This sounds a lot like something I'm looking to do. I've rolled my own getChunk method and within that I want to first check for the existance of a chunk(chunk1 for example) which I can already do and if the chunk doesn't exist, check my component folder /elements/chunks/ for chunk1.chunk.html and register it if I then find it, otherwise I would throw an error.
I've tried to find a way to do this but can't quite get my head around creating a static chunk in a snippet.
I'd be interested to know how I could do this as this functionality could save time rolling code from system to system.
Thanks.