67

Every now and then I see vendor being used in a directory structure on web apps.

Like this:

<script src="js/vendor/modernizr-2.6.2.min.js"></script> 

What does this mean? Why do people use it?

More importantly, should I use it? I make web apps using php and javascript.

Undo
  • 25,519
  • 37
  • 106
  • 129
Ben Harvey
  • 1,793
  • 2
  • 16
  • 23

3 Answers3

94

It's a common convention to put files coming from various third party sources (the "vendors") in a folder named that way.

You can use it as it makes it clearer what's "from the project" and what is a dependency you rely upon, but it is merely a convention, not an obligation.

Lepidosteus
  • 11,779
  • 4
  • 39
  • 51
34

/vendor usually refers to a directory that contains third party plugins.

Steve
  • 8,609
  • 6
  • 40
  • 54
6

Most if the time, there are 3rd party libs stored and commonly it's ignored in VCS.

Emii Khaos
  • 9,983
  • 3
  • 34
  • 57