Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In a web project, what is the difference between a dist and build directory (traditionally)?

Am I correct in thinking, a dist directory and a build directory are both production directories that contain the files that need to be deployed to the web server.

Which to use?

A dist directory could have both files that are used during development (.php, etc), and files that are generated from a build script (.min.js, etc).

A build directory, however is entirely made up of files from a build script, and no development should take place within the build directory.

So, are these assumptions correct? Also, I realize that if you are using a framework, you'd use their conventions. I am just wondering, what these naming conventions are generally, if you were to create say a php project from scratch.

like image 217
Mike McLin Avatar asked Apr 30 '13 15:04

Mike McLin


People also ask

What is the difference between Dist and build folder?

Dist is for distribution and contains minified code. Build contains code that is not minified and not ready for production deployment.

What is a dist directory?

The dist folder, short for distribution folder, is dynamically generated when using the nuxt generate commands and includes the generated production ready HTML files and assets that are necessary to deploy and run your statically generated Nuxt application.

What is dist folder in Java project?

dist is the folder where your generated archives are stored (so it gets updated through clean and build). build folder contains compiled classes and resources, but not the compressed archives.

What does Dist stand for in programming?

dist/ The /dist stands for distributable. The /dist folder contains the minimized version of the source code. The code present in the /dist folder is actually the code which is used on production web applications.


1 Answers

In a generic sense - a dist dir is for distribution. It is prod ready and can be distributed to other users who want to try it for beta testing, production use, whatever. A build dir is when you have ran you pre-deployment script manually or automatically and created a resource that can now be deployed (usually not distributed) into one or multiple production servers. This could contain sometimes just a tarball which can then be un-tarred and installed on the server.

Annoying naming practices..varies from people to people and organization to organization and technology to technology

like image 148
raidenace Avatar answered Sep 19 '22 08:09

raidenace