Right now, mix.version creates a build directory and sticks the versioned assets in there. This tends to break relative paths for things like images and files. The workaround is to copy the fonts or images or whatever to the build directory (mix.copy( "resources/images", "includes/build/images" );) but this is slightly annoying.
I see two fixes.
1. Version in place instead of a build directory.
This could even delete the original file (if it exists) once it versions it.
2. Make versioning a Elixir level setting
We would default to false for development (to save time) and true for production.
(Also, we could delete the original file as well as mentioned above.)
#1 sounds good. Give them control.
I think we should delete the original files if we version them. Thoughts?
Hmm, I think so. You are asking for versioned files, so I am guessing it should
Currently the elixir helper method in ColdBox will default to the path if no manifest mapping is found. That means elixir( "js/app.js" ) would point to /includes/js/app.js if there is no versioned file mapped.
With that in mind, what do you think about ignoring the mix.version call if we aren't in production mode. It really just adds time with little to no benefit in development.
This might be as simple as a new default build location. elixir.config.versioning.buildFolder = ".";