Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the role of src and dist folders?

I'm looking at a git repo for a jquery plugin. I want to make a few changes for use in my own project, but when I opened up the repo it had a structure I've never seen before. I'm not sure which files to use / copy into my own project.

There is a "dist" and a "src" folder. What purpose do these serve? Is this something specific for gruntjs or maybe jquery plugins?

The git repo I'm curious about: https://github.com/ducksboard/gridster.js

like image 974
Don P Avatar asked May 19 '14 06:05

Don P


People also ask

What is dist and src folder?

SRC is the folder, where your source code exists, dist is the binaries that get generated of these source code.

What is the role of the src folder?

The src stands for source. The /src folder comprises of the raw non-minified code. The /src folder is used to store the file with the primary purpose of reading (and/or editing) the code. The /src folder contains all the sources, i.e. the code which is required to be manipulated before it can be used.

What does dist folder mean?

The shortform dist stands for distributable and refers to a directory where files will be stored that can be directly used by others without the need to compile or minify the source code that is being reused.

What is dist folder in bootstrap?

The dist/ folder includes everything listed in the precompiled download section above. The docs/ folder includes the source code for our documentation, and examples/ of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.


1 Answers

src/ stands for source, and is the raw code before minification or concatenation or some other compilation - used to read/edit the code.

dist/ stands for distribution, and is the minified/concatenated version - actually used on production sites.

This is a common task that is done for assets on the web to make them smaller.

You can see an example here: http://blog.kevinchisholm.com/javascript/node-js/javascript-concatenation-and-minification-with-the-grunt-js-task-runer/

like image 140
dmullings Avatar answered Oct 18 '22 14:10

dmullings