I am not familiar with either Azure or Heroku, so I cannot give any idea about these deployment options.
I use (4 dedicated servers with two of them exclusively for working with static files), the ability to create nested and miniature javascript files (for front-end) and add all these files to the main repository has several advantages
- You only need to run it once (either on your development computer or on an intermediate server, whatever you want). This is especially useful when you need to run multiple static servers, since you do not need to run the build command on each server. It can be argued that they can use something like
Glusterfs to synchronize files from one static server to all other servers, and the build process needs to be run only once. However, this is a completely different story when it comes to these kinds of settings. - This simplifies the deployment process, just pulls out the new code and reboots the server if necessary (provided that you have a mechanism to increase the static version of the file so that all your clients get the latest version)
- Avoid unnecessary dependencies on your production servers. This may seem strange to some people, but I just do not want to install any additional libraries on my production servers unless they are absolutely necessary. When the build process runs locally on my dev machine, my production servers have only what they need to run the production code, and nothing else
However, this approach also has some disadvantages:
- When several developers in your team (by accident) start the build process and commit the code, you will have a crazy list of conflicts. However, it can be solved by simply starting the build process again after you merge all the changes from the other guys. This is more about workflow.
- Your repository will be larger. I personally do not think this is a big problem, given the few additional MB of my combined and mini files. If your javascript frontend is big enough to be a problem, then this is another story.
source share