gjm's avatar
Level 2

Asset management and version control

Hi.

I'm using Mix (this applies to Elixir as well i guess) to manage my frontend assets. I have Mix configured to version files in production but not in dev. As such, when i update assets, i get updated app.js and app.css files in dev and app.{hash}.js and app.{hash}.css files in production.

What is your advice on how to leverage this with version control?

  1. Put the files in version control? If so how do i manage the constant changes during development? Keep adding new hashed files? Do i leave app.js and app.css on the production server?

  2. .gitignore the js and css files and run npm on the production server to compile the assets locally?

  3. Some other solution?

What are your thoughts on this?

Thanks in advance.

0 likes
1 reply
phpMick's avatar

I run gulp production, then put the files in GIT, along with rev-mainfest.json.

Then I push and pull and it's live.

Don't really like it because I think it's easy to miss the versioned files from GIT, then production would end up with a missing file.

I wonder if there is a way to GIT add the versioned files automatically?

Mick

Please or to participate in this conversation.