asprin
Active member
I read through the documentation and came across
I understood what it's used for but the "how" part is unclear.
Let's say my addon makes use of an image that is stored under
(a) How would I serve it on the page during development? Using
(b) When I pack/build the addon, how do I ensure that the file in
(c) And when this copying happens, will I need to update my
Hope I'm making sense.
additional_files
parameter in the build.json
file. That's a terrific option to have. However, having a little difficulty grasping my mind around it.I understood what it's used for but the "how" part is unclear.
Let's say my addon makes use of an image that is stored under
src/addons/myaddon/_files/images/cool.png
. The question now arises -(a) How would I serve it on the page during development? Using
<img src="{{ base_url('????') }}" />
what would go in there?(b) When I pack/build the addon, how do I ensure that the file in
src/addons/myaddon/_files/images/cool.png
gets copied to <root>/data/myaddon/images/cool.png
? My understanding is that under additional_files
array, we specify the location of image that we need to copy but not the destination it needs to get copied to.(c) And when this copying happens, will I need to update my
img src
attribute since it will be pointing to src/addons/myaddon/_files/images/cool.png
?Hope I'm making sense.